openai / gpt-2

Code for the paper "Language Models are Unsupervised Multitask Learners"
https://openai.com/blog/better-language-models/
Other
22.42k stars 5.51k forks source link

got this error #246

Open psdprasad opened 4 years ago

psdprasad commented 4 years ago

~/gpt-2$ python3 src/interactive_conditional_samples.py Traceback (most recent call last): File "src/interactive_conditional_samples.py", line 9, in import model, sample, encoder File "/home/prasad/gpt-2/src/model.py", line 3, in from tensorflow.contrib.training import HParams ModuleNotFoundError: No module named 'tensorflow.contrib'

skillor commented 4 years ago

Sounds like an installation error to me: maybe this will help? https://github.com/openai/gpt-2/issues/236#issue-581076387

HonayKing commented 4 years ago

It should be a tensorflow version error! You can reinstall a tensorflow version with contrib module. Such as: tensorflow==1.12.0 or tensorflow-gpu==1.12.0 ...

moona3k commented 4 years ago

Sounds like an installation error to me: maybe this will help? #236 (comment)

Awesome, this fixed the issue :)

python3 -m pip install tensorflow==1.13.1
python3 -m pip install regex