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

How make working under TF2? #6

Open
Luke1962 opened this issue Oct 30, 2022 · 0 comments
Open

How make working under TF2? #6

Luke1962 opened this issue Oct 30, 2022 · 0 comments

Comments

@Luke1962
Copy link

First of all, thank you for your effort.
I'd like to implement your code on my personal robot, beginning with some tests on PC
Unfortunately without success, maybe because I've installed TF2 (2.10.0) on python 3.8.10 and the code seems written for TF1 . Is it true?
I spent several days trying to convert code to TF2 using 'tf.compat.v1.xxxx' , but without success ( I'm an absolute newbie in Deep Learning).
After loading the model 'model.ckpt-200000' from Italian_108M, in predict.py with :

    with tf.compat.v1.Session() as sess:
        new_saver = tf.compat.v1.train.import_meta_graph(MODEL_DIR + CHECKPOINT_NAME +'.meta')
        new_saver.restore(sess, MODEL_DIR+   CHECKPOINT_NAME) #'model.ckpt-200000'

I get exception 'Attempting to capture an EagerTensor without building a function' on nest statement:
output_candidates = [chatbot_model.infer(encoded_inputs, decode_length=1) for _ in range(NUM_SAMPLES)]

At this point I don't know anymore how to go on...
So my question is if is it possible to have some help on porting the code to TF2.
Thank you in advance

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

1 participant