Skip to content
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

process_batch_input_for_RNN could be shortened? #1

Closed
wenyong-h opened this issue Aug 3, 2016 · 4 comments
Closed

process_batch_input_for_RNN could be shortened? #1

wenyong-h opened this issue Aug 3, 2016 · 4 comments

Comments

@wenyong-h
Copy link

wenyong-h commented Aug 3, 2016

    batch_input_ = tf.transpose(batch_input, perm=[2, 0, 1])
    X = tf.transpose(batch_input_)

should be equivalent to

    X = tf.transpose(batch_input, perm=[1, 0, 2])
@wenyong-h
Copy link
Author

By the way, when i run the code under tensorflow 0.9, the loss and accuracy stay the same after every iteration.
the result is like this:

Iteration: 119 Loss: 230.362 Train Accuracy: 9.42857 Test Accuracy: 12.6263

I also tried to run under tensorflow 0.10, the loss will change a little bit, but could almost be ignored.

@KnHuq
Copy link
Owner

KnHuq commented Aug 9, 2016

@wenyong-h Your loss is not moving because you are not getting any gradient. Please check the terminal when you run the jupyter notebook. Is there any error?

@wenyong-h
Copy link
Author

wenyong-h commented Aug 22, 2016

@KnHuq i'm running the python file, not the ipython notebook. There was no error.
I tried using AdamOptimizer instead of AdadeltaOptimizer, then everything is right.
this is the result of one run of the Vanilla RNN

Iteration: 119 Loss: 46.1185 Train Accuracy: 99.6429 Test Accuracy: 94.697

@KnHuq
Copy link
Owner

KnHuq commented Aug 30, 2016

@wenyong-h You are right! One transpose will do the same thing!

@KnHuq KnHuq closed this as completed Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants