You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the lstm_predictor.py file , i change to the tf.unpack. But still error pops out: Expected int for argument 'axis' not <tf.Tensor 'input:0' shape=(?, 10, 1) dtype=float64>.
File "", line 1, in
runfile('/home/sherlock/Downloads/TensorFlow-Tutorials-for-Time-Series-master/lstm-for-epf.py', wdir='/home/sherlock/Downloads/TensorFlow-Tutorials-for-Time-Series-master')
File "/usr/local/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
execfile(filename, namespace)
File "/usr/local/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)
File "/home/sherlock/Downloads/TensorFlow-Tutorials-for-Time-Series-master/lstm-for-epf.py", line 42, in
regressor.fit(X['train'], y['train'], monitors=[validation_monitor], logdir=LOG_DIR)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 257, in fit
monitors=monitors)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 662, in _train_model
train_op, loss_op = self._get_train_ops(features, targets)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 963, in _get_train_ops
_, loss, train_op = self._call_model_fn(features, targets, ModeKeys.TRAIN)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 946, in _call_model_fn
return self._model_fn(features, targets, mode=mode)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 493, in _model_fn
predictions, loss = model_fn(features, targets)
File "lstm_predictor.py", line 116, in lstm_model
x = tf.unpack(1, time_steps, X)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 799, in unpack
return gen_array_ops._unpack(value, num=num, axis=axis, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 3023, in _unpack
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 666, in apply_op
attr_value.i = _MakeInt(value, key)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 155, in _MakeInt
(arg_name, repr(v)))
TypeError: Expected int for argument 'axis' not <tf.Tensor 'input:0' shape=(?, 10, 1) dtype=float64>.
The text was updated successfully, but these errors were encountered:
in the lstm_predictor.py file , i change to the tf.unpack. But still error pops out: Expected int for argument 'axis' not <tf.Tensor 'input:0' shape=(?, 10, 1) dtype=float64>.
def lstm_model(X, y):
stacked_lstm = tf.nn.rnn_cell.MultiRNNCell(lstm_cells(rnn_layers), state_is_tuple=True)
**x = tf.unpack(1, time_steps, X)**
full version of error report:
File "", line 1, in
runfile('/home/sherlock/Downloads/TensorFlow-Tutorials-for-Time-Series-master/lstm-for-epf.py', wdir='/home/sherlock/Downloads/TensorFlow-Tutorials-for-Time-Series-master')
File "/usr/local/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
execfile(filename, namespace)
File "/usr/local/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)
File "/home/sherlock/Downloads/TensorFlow-Tutorials-for-Time-Series-master/lstm-for-epf.py", line 42, in
regressor.fit(X['train'], y['train'], monitors=[validation_monitor], logdir=LOG_DIR)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 257, in fit
monitors=monitors)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 662, in _train_model
train_op, loss_op = self._get_train_ops(features, targets)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 963, in _get_train_ops
_, loss, train_op = self._call_model_fn(features, targets, ModeKeys.TRAIN)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 946, in _call_model_fn
return self._model_fn(features, targets, mode=mode)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 493, in _model_fn
predictions, loss = model_fn(features, targets)
File "lstm_predictor.py", line 116, in lstm_model
x = tf.unpack(1, time_steps, X)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 799, in unpack
return gen_array_ops._unpack(value, num=num, axis=axis, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 3023, in _unpack
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 666, in apply_op
attr_value.i = _MakeInt(value, key)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 155, in _MakeInt
(arg_name, repr(v)))
TypeError: Expected int for argument 'axis' not <tf.Tensor 'input:0' shape=(?, 10, 1) dtype=float64>.
The text was updated successfully, but these errors were encountered: