-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add a test for training MNIST on CUDA and CPU that verifies same result as Jax #43
base: main
Are you sure you want to change the base?
Conversation
83f9e31
to
77fbd83
Compare
5dce0e9
to
2592d0a
Compare
is there a way to get a test independent of JAX? If you don't have a simple way I'll try to make one later |
…t as Jax The two tests fail for different reasons. Things work OK except the procedure to initialize the optimizer.
2592d0a
to
4e4d641
Compare
return next(batches) | ||
|
||
|
||
def get_model(): |
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.
Thank you @sogartar for this pull request! It seems that this function duplicates with the one
iree-jax/examples/mnist_export.py
Lines 61 to 69 in 26006ef
def build_model(): | |
init_random_params, predict = stax.serial( | |
Dense(1024), | |
Relu, | |
Dense(1024), | |
Relu, | |
Dense(10), | |
LogSoftmax, | |
) |
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.
Yes, I copied the model from there. I guess mnist_export.py
example can benefit from a test too.
The two tests fail for different reasons. Things work OK except the procedure to initialize the optimizer.