Error starting Tensorflow Sequence to Sequence Tutorial

I get the following error message following the instructions in the Sequence to Sequence tutorial: https://www.tensorflow.org/tutorials/seq2seq

When i started

python translate.py --data-dir [your data directory]

I end up with the following error when the script creates the layers:

AttributeError: 'NoneType' object has no attribute 'update'

(Full stack trace below)

System Information:

  • macOS 10.12.5
  • Python 3.5.3
  • Tensorflow 1.2.0
  • Tensorflow installed via pip (9.0.1) within conda (4.3.21)

In addition, WMT data is uploaded and processed. I downloaded data from English to French, as indicated in the tutorial.

Any help would be greatly appreciated.

Preparing WMT data in /tmp
2017-06-16 09:28:44.185353: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-16 09:28:44.185383: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-06-16 09:28:44.185388: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-16 09:28:44.185393: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Creating 3 layers of 1024 units.
Traceback (most recent call last):
 File "translate.py", line 322, in <module>
   tf.app.run()
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/site-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 "/Users/<redacted>/models/tutorials/rnn/translate/seq2seq_model.py", line 179, in __init__
   softmax_loss_function=softmax_loss_function)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/site-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 1206, in model_with_buckets
   decoder_inputs[:bucket[1]])
 File "/Users/<redacted>/models/tutorials/rnn/translate/seq2seq_model.py", line 178, in <lambda>
  lambda x, y: seq2seq_f(x, y, False),
 File "/Users/<redacted>/models/tutorials/rnn/translate/seq2seq_model.py", line 142, in seq2seq_f
  dtype=dtype)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/site-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 848, in embedding_attention_seq2seq
  encoder_cell = copy.deepcopy(cell)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 166, in deepcopy
  y = copier(memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 476, in __deepcopy__
  setattr(result, k, copy.deepcopy(v, memo))
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 218, in _deepcopy_list
  y.append(deepcopy(a, memo))
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 182, in deepcopy
  y = _reconstruct(x, rv, 1, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 297, in _reconstruct
  state = deepcopy(state, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 243, in _deepcopy_dict
  y[deepcopy(key, memo)] = deepcopy(value, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 182, in deepcopy
  y = _reconstruct(x, rv, 1, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 297, in _reconstruct
  state = deepcopy(state, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 243, in _deepcopy_dict
  y[deepcopy(key, memo)] = deepcopy(value, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 218, in _deepcopy_list
  y.append(deepcopy(a, memo))
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 182, in deepcopy
  y = _reconstruct(x, rv, 1, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 297, in _reconstruct
  state = deepcopy(state, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 243, in _deepcopy_dict
  y[deepcopy(key, memo)] = deepcopy(value, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 218, in _deepcopy_list
  y.append(deepcopy(a, memo))
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 223, in _deepcopy_tuple
  y = [deepcopy(a, memo) for a in x]
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 223, in <listcomp>
  y = [deepcopy(a, memo) for a in x]
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 243, in _deepcopy_dict
  y[deepcopy(key, memo)] = deepcopy(value, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 182, in deepcopy
  y = _reconstruct(x, rv, 1, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 297, in _reconstruct
  state = deepcopy(state, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 243, in _deepcopy_dict
  y[deepcopy(key, memo)] = deepcopy(value, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 182, in deepcopy
  y = _reconstruct(x, rv, 1, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 297, in _reconstruct
  state = deepcopy(state, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 155, in deepcopy
  y = copier(x, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 243, in _deepcopy_dict
  y[deepcopy(key, memo)] = deepcopy(value, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 182, in deepcopy
  y = _reconstruct(x, rv, 1, memo)
 File "/Users/<redacted>/anaconda/envs/tf/lib/python3.5/copy.py", line 306, in _reconstruct
  y.__dict__.update(state)
AttributeError: 'NoneType' object has no attribute 'update'
+4
source share
2 answers

, , , . , - , translate.py, 4 : _buckets = [(5, 10), (10, 15), (20, 25), (40, 50)] , . _buckets = [(10, 15)].

+3

Source: https://habr.com/ru/post/1679460/


All Articles