seq2seq icon indicating copy to clipboard operation
seq2seq copied to clipboard

Ho wto initialize tables in my own model?

Open anglil opened this issue 8 years ago • 3 comments

Hi, I created a new model based on the base model, and there are hashtables in my model that require table initialization. Where should I insert the tables_initializer command? Without table initialization, I'd always get the following error messasge:

FailedPreconditionError (see above for traceback): Table not initialized.

Thanks in advance!

anglil avatar Sep 07 '17 14:09 anglil

@anglil

Hi, I think you have not initialised the global variables after creating the graph. before doing any operation on graph you can use following; sess.run(tf.global_variables_initializer())

as long as you don't do this, the weights and biased in your network graph wound be initialised. so you get FailedPreconditionError .

I had same kind of problems sometimes. I found this to be working. :)

Hope it will help you.

Biswajit2902 avatar Mar 18 '18 09:03 Biswajit2902

Thank you.

On Sun, Mar 18, 2018 at 5:07 AM Biswajit2902 [email protected] wrote:

@anglil https://github.com/anglil

Hi, I think you have not initialised the global variables after creating the graph. before doing any operation on graph you can use following; sess.run(tf.global_variables_initializer())

as long as you don't do this, the weights and biased in your network graph wound be initialised. so you get FailedPreconditionError https://www.tensorflow.org/api_docs/python/tf/errors/FailedPreconditionError .

I had same kind of problems sometimes. I found this to be working. :)

Hope it will help you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/seq2seq/issues/297#issuecomment-373982946, or mute the thread https://github.com/notifications/unsubscribe-auth/AQdw_5AJ4fZ4LbJSOOLQRwNjn2sBBErAks5tfiPFgaJpZM4PP8bC .

anglil avatar Mar 18 '18 09:03 anglil

welcome :)

Biswajit2902 avatar Mar 18 '18 10:03 Biswajit2902