daniel-kukiela / nmt-chatbot

NMT Chatbot
GNU General Public License v3.0
386 stars 215 forks source link

Can't run train.py #170

Open Whooptie opened 3 years ago

Whooptie commented 3 years ago

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 commented 3 years ago

https://github.com/daniel-kukiela/nmt-chatbot/issues/143

Nathan-Chell commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

What do you mean by terminated? Any errors ?

My best guess is a OOM error

Whooptie commented 3 years ago

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 commented 1 year ago

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 commented 1 year ago

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.