models icon indicating copy to clipboard operation
models copied to clipboard

sequence to sequence model error

Open ghost opened this issue 9 years ago • 34 comments

Please let us know which model this issue is about (specify the top-level directory)

Hello everyone, I am getting the following errors after executing translate.py

Can anyone please help me in resolving this error Thanks in advance sotierror

ghost avatar Feb 21 '17 20:02 ghost

Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version. We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!

tatatodd avatar Feb 28 '17 22:02 tatatodd

Hello, I am using ubuntu 16.04 LTS on vmware with RAM 2gb and disk space 100 GB. Tensorflow version is 1.0

Sent from my iPhone

On Feb 28, 2017, at 4:36 PM, Todd Wang [email protected] wrote:

Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version. We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ghost avatar Feb 28 '17 22:02 ghost

@ymakkapa Can you also show the complete command-line you ran that caused the error? Thanks!

tatatodd avatar Mar 01 '17 06:03 tatatodd

you shouldn't use tf.contrib.seq2seq anymore. just do: from tensorflow.python.ops import rnn_cell and then: rnn_cell.GRUCell(size)

mhnatiuk avatar Mar 10 '17 16:03 mhnatiuk

Hi @tatatodd , This is the command line - python translate.py --data_dir /home/ymakkapa/TensorFlow/translate

ghost avatar Mar 10 '17 20:03 ghost

@mhnatiuk , Should I make these changes in translate.py file

ghost avatar Mar 10 '17 20:03 ghost

Hi @mhnatiuk , I checked all my files but could not find the line gave by you in any of my files

ghost avatar Mar 10 '17 21:03 ghost

@ymakkapa I guess you're following https://www.tensorflow.org/tutorials/seq2seq?

The tutorial does not seem to have been update for TF1.0 yet. @ebrevdo, @xmbrst Is this the case? Who is responsible for ensuring all our tutorials work with the current release version?

As mentioned above, the GRUCell class appears to have moved. It is being instantiated in the file seq2seq_model.py

Hopefully this will help you work around the problem for now.

prb12 avatar Mar 11 '17 02:03 prb12

Yes @prb12 . But I am getting the above error. Regarding TF version, i did not upgrade it to 1.0

ghost avatar Mar 11 '17 02:03 ghost

Lukasz, can you update the tutorial?

ebrevdo avatar Mar 15 '17 05:03 ebrevdo

I think we decided to wait for the new tutorial, there are many problems with the old one and it's going away very soon (I hope).

lukaszkaiser avatar Mar 15 '17 06:03 lukaszkaiser

We should Mark it as deprecated and fix any small bugs until the new one is ready.

On Mar 14, 2017 11:10 PM, "Lukasz Kaiser" [email protected] wrote:

I think we decided to wait for the new tutorial, there are many problems with the old one and it's going away very soon (I hope).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/1050#issuecomment-286650176, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtimxaAYjmSI7QclmaRqtVnKe0-hXY9ks5rl4DggaJpZM4MH12z .

ebrevdo avatar Mar 15 '17 15:03 ebrevdo

+1 to @ebrevdo 's suggestion!

prb12 avatar Mar 15 '17 16:03 prb12

Hello everyone, Can I get the link of the updated code for sequence to sequence models tutorial?

ghost avatar Mar 16 '17 04:03 ghost

following @ebrevdo talk on sequence to sequence models @ tfsummit I decided to try dynamic decoding. Unfortunately, with so many options it's difficult to wire things up fast. When are you planning to release some code showing new features?

mhnatiuk avatar Mar 28 '17 13:03 mhnatiuk

Within the next month, hopefully.

On Mar 28, 2017 6:55 AM, "mhnatiuk" [email protected] wrote:

following @ebrevdo https://github.com/ebrevdo talk on sequence to sequence models @ tfsummit I decided to try dynamic decoding. Unfortunately, with so many options it's difficult to wire things up fast. When are you planning to release some code showing new features?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/1050#issuecomment-289777246, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtim127Nt9qUNw_Q8YuT-cI-UEIGm9vks5rqRFHgaJpZM4MH12z .

ebrevdo avatar Mar 28 '17 15:03 ebrevdo

Looks like you have a problem with permissions to write to tmp folder, the issue has nothing to do with tensorflow itself as far as I see. This question is better suited for stackoverflow though

@ebrevdo Thanks for the reply. If I could contribute in any way, it would be great. I'm trying to work on my solution to specialized translation in my company, so I have to go through all of this, I might bring some user perspective?

mhnatiuk avatar Mar 28 '17 21:03 mhnatiuk

HI, I deleted everything and installed Ubuntu 16.04.2 LTS and the output processed for a long time and got errors again. I got the code from "https://github.com/tensorflow/models/tree/master/tutorials/rnn/translate" and got the following errors. Can anyone please help me with this. I did not upgrade to tensorflow 1.0 fresh error seq

ghost avatar Mar 29 '17 16:03 ghost

@ebrevdo Is there any chance for the tutorial/code to be updated? (as you mentioned few posts earlier?)

smolendawid avatar May 24 '17 13:05 smolendawid

Using tensorflow r1.2, I got the error below:

➜  translate git:(master) ✗ python translate.py --data_dir ~/Public/data/nmt/nmt --train_dir train_dir  --en_vocab_size=40000 --fr_vocab_size=40000 --steps_per_checkpoint=50 --size=256 --num_layers=2
Preparing WMT data in /home/vimos/Public/data/nmt/nmt
2017-05-25 17:41:48.950970: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-05-25 17:41:48.951456: I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] Found device 0 with properties: 
name: GeForce GTX 970M
major: 5 minor: 2 memoryClockRate (GHz) 1.038
pciBusID 0000:01:00.0
Total memory: 2.95GiB
Free memory: 2.28GiB
2017-05-25 17:41:48.951479: I tensorflow/core/common_runtime/gpu/gpu_device.cc:927] DMA: 0 
2017-05-25 17:41:48.951485: I tensorflow/core/common_runtime/gpu/gpu_device.cc:937] 0:   Y 
2017-05-25 17:41:48.951499: I tensorflow/core/common_runtime/gpu/gpu_device.cc:996] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 970M, pci bus id: 0000:01:00.0)
Creating 2 layers of 256 units.
Traceback (most recent call last):
  File "translate.py", line 322, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "translate.py", line 319, in main
    train()
  File "translate.py", line 178, in train
    model = create_model(sess, False)
  File "translate.py", line 136, in create_model
    dtype=dtype)
  File "/data/home/vimos/Public/git/github/ml/tensorflow/models/tutorials/rnn/translate/seq2seq_model.py", line 179, in __init__
    softmax_loss_function=softmax_loss_function)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 1207, in model_with_buckets
    decoder_inputs[:bucket[1]])
  File "/data/home/vimos/Public/git/github/ml/tensorflow/models/tutorials/rnn/translate/seq2seq_model.py", line 178, in <lambda>
    lambda x, y: seq2seq_f(x, y, False),
  File "/data/home/vimos/Public/git/github/ml/tensorflow/models/tutorials/rnn/translate/seq2seq_model.py", line 142, in seq2seq_f
    dtype=dtype)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 849, in embedding_attention_seq2seq
    encoder_cell = copy.deepcopy(cell)
  File "/usr/lib/python2.7/copy.py", line 174, in deepcopy
    y = copier(memo)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/layers/base.py", line 474, in __deepcopy__
    setattr(result, k, copy.deepcopy(v, memo))
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 230, in _deepcopy_list
    y.append(deepcopy(a, memo))
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 230, in _deepcopy_list
    y.append(deepcopy(a, memo))
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 230, in _deepcopy_list
    y.append(deepcopy(a, memo))
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 237, in _deepcopy_tuple
    y.append(deepcopy(a, memo))
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 343, in _reconstruct
    y.__dict__.update(state)
AttributeError: 'NoneType' object has no attribute 'update'

Vimos avatar May 25 '17 09:05 Vimos