Closed SeekPoint closed 7 years ago
It seems that the stable release (0.12.1) and the current head (0.12.head) use a different interface to the rnn_cell module.
Temporarily, replacing "tf.nn.rnn_cell" with "tf.contrib.rnn_cell" should fix the problem in 0.12.head but I'll probably wait until 1.0 becomes stable to update the repo's syntax.
mldl@mldlUB1604:/media/mldl/data1t/os_prj/Dynamic-Memory-Networks-in-TensorFlow$ sudo python dmn_train.py -b 2 2017-02-02 23:52:48: I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.8.0 locally 2017-02-02 23:52:48: I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally 2017-02-02 23:52:48: I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.8.0 locally 2017-02-02 23:52:48: I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally 2017-02-02 23:52:48: I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.8.0 locally Training DMN plus on babi task 2 ==> Loading test from /media/mldl/data1t/os_prj/Dynamic-Memory-Networks-in-TensorFlow/data/en-10k/qa2_two-supporting-facts_train.txt ==> Loading test from /media/mldl/data1t/os_prj/Dynamic-Memory-Networks-in-TensorFlow/data/en-10k/qa2_two-supporting-facts_test.txt ==> get train inputs ==> get test inputs Traceback (most recent call last): File "dmn_train.py", line 48, in
model = DMN_PLUS(config)
File "/media/mldl/data1t/os_prj/Dynamic-Memory-Networks-in-TensorFlow/dmn_plus.py", line 399, in init
self.add_reused_variables()
File "/media/mldl/data1t/os_prj/Dynamic-Memory-Networks-in-TensorFlow/dmn_plus.py", line 125, in add_reused_variables
gru_cell = tf.nn.rnn_cell.GRUCell(self.config.hidden_size)
AttributeError: 'module' object has no attribute 'rnn_cell'
mldl@mldlUB1604:/media/mldl/data1t/os_prj/Dynamic-Memory-Networks-in-TensorFlow$