-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: more gradient optimizer tests #1217
test: more gradient optimizer tests #1217
Conversation
test/TensorFlowNET.UnitTest/Training/GradientDescentOptimizerTests.cs
Outdated
Show resolved
Hide resolved
Tuple.Create(grads1, var1 as IVariableV1) | ||
}; | ||
var sgd_op = tf.train.GradientDescentOptimizer(3.0f) | ||
.apply_gradients(grads_and_vars, global_step: global_step); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AsakusaRinne why does apply_gradiens
take System.Tuple
while zip
produces (T1, T2)
. Would it be better to replace or extend apply_gradients
interface to support valuetuple as well?
9308d67
to
1f3f39e
Compare
1f3f39e
to
d54f7a6
Compare
// Validate updated params | ||
var np_pred = 1.0 * 4.0 + 2.0 * 5.0 + 3.0; | ||
var np_grad = 2 * np_pred; | ||
self.assertAllCloseAccordingToType( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Wanglongzhi2001 Hm, now it calculates but the test doesn't pass. However, the code corresponds to TensorFlow original test. I have to check math there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There just was a small typo, but I didn't have time to debug it :-D
Hi @AsakusaRinne @Wanglongzhi2001 @Oceania2018 |
No description provided.