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

Can't run train.py #170

Open
Whooptie opened this issue Dec 15, 2020 · 7 comments
Open

Can't run train.py #170

Whooptie opened this issue Dec 15, 2020 · 7 comments

Comments

@Whooptie
Copy link

when i try to run train.py after the data is prepaird ik get this problem:

========= RESTART: M:\AI\nmt-chatbot-master\nmt-chatbot-master\train.py ========
Traceback (most recent call last):
File "M:\AI\nmt-chatbot-master\nmt-chatbot-master\train.py", line 8, in
from nmt import nmt
File "M:\AI\nmt-chatbot-master\nmt-chatbot-master\nmt\nmt.py", line 28, in
from . import inference
File "M:\AI\nmt-chatbot-master\nmt-chatbot-master\nmt\inference.py", line 25, in
from . import gnmt_model
File "M:\AI\nmt-chatbot-master\nmt-chatbot-master\nmt\gnmt_model.py", line 261, in
class GNMTAttentionMultiCell(tf.nn.rnn_cell.MultiRNNCell):
AttributeError: module 'tensorflow._api.v2.nn' has no attribute 'rnn_cell'

pleas help i'm a verry new newby to python

@dusty-dusty
Copy link

#143

@Nathan-Chell
Copy link

You are using Tensorflow 2.x. for this code you need to use Tensorflow 1.x preferably 1.15. You'll have to uninstall tf 2 and explicitly install tf 1.15 with: pip install tensorflow-gpu==1.15

@Whooptie
Copy link
Author

I did install tensorflow 1.14 yesterday and it all worked, but wen i started training again it filles the shuffle and then its terminated, any idea why? Btw i am only using cpu its a ryzen 5 1600, its running in ubuntu in virtualbox

@Nathan-Chell
Copy link

What do you mean by terminated? Any errors ?

My best guess is a OOM error

@Whooptie
Copy link
Author

no errors at all

start step 0, lr 0.001, mon dec 21 13:30:47 2020

Init train iterator, skipping 0 elements

2020-12-21 13:30:58.275320: I tensorflow/cor/kernels/shuffle_dataset_op.cc:110] Filling up shuffle buffer (this may take a while): 101395 of 128000
2020-12-21 13:31:00.976069: I tensorflow/cor/kernels/shuffle_dataset_op.cc:121] shuffle buffer filled
terminated

then the whole system freezes and training stopped

@M4A1SD
Copy link

M4A1SD commented Aug 8, 2022

You are using Tensorflow 2.x. for this code you need to use Tensorflow 1.x preferably 1.15. You'll have to uninstall tf 2 and explicitly install tf 1.15 with: pip install tensorflow-gpu==1.15

image

this pip doesnt work
i tried downloading manually [ https://pypi.org/project/tensorflow-gpu/1.15.0/#files ]
image

is there another way?

@Nathan-Chell
Copy link

You are using Tensorflow 2.x. for this code you need to use Tensorflow 1.x preferably 1.15. You'll have to uninstall tf 2 and explicitly install tf 1.15 with: pip install tensorflow-gpu==1.15

image

this pip doesnt work i tried downloading manually [ https://pypi.org/project/tensorflow-gpu/1.15.0/#files ] image

is there another way?

You are using python 3.10 which no longer supports tensorflow 1.x. You need to uninstall it and download python 3.7 - or you can create a new virtual environment if you have gone that route.

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

4 participants