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

Error on output #31

Open
silicahd opened this issue Oct 16, 2020 · 1 comment
Open

Error on output #31

silicahd opened this issue Oct 16, 2020 · 1 comment

Comments

@silicahd
Copy link

silicahd commented Oct 16, 2020

After about 5 hours I think I am throwing in the towel here. I have ran all the commands at noted. I am running this in google colab where I tested a few other systems. However this one works great until I try to run this last command.

!python3 main.py --model 1.5B.json [--top_k Top-K-Truncation] --predict_text "Hello there! My name is"

Error:

2020-10-16 23:42:00.183472: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
Traceback (most recent call last):
  File "main.py", line 12, in <module>
    from model_fns import *
  File "/home/GPT2/model_fns.py", line 6, in <module>
    from optimizers import create_train_op
  File "/home/GPT2/optimizers.py", line 100, in <module>
    class AdafactorOptimizer(tf.train.Optimizer):
AttributeError: module 'tensorflow._api.v2.train' has no attribute 'Optimizer'
@ConnorJL
Copy link
Owner

This repo is deprecated and you should use transformers if possible. Are you using Tensorflow version 1.15 or earlier? This repo does not work with Tensorflow 2. (Also, the command line parameters in brackets are optional and shouldn't be passed like that)

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