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
I am trying to build a recurrentshop.RecurrentModel() as follows. It builds the graph if stateful=False but raises an error when stateful=True. Ì worked with stateful RNNs in Keras before without any problems. Is there anything special i need to think of when building stateful RNNs with recurrentshop?
C:\Users\Manuel\AppData\Roaming\Python\Python36\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
C:\Users\Manuel\AppData\Roaming\Python\Python36\site-packages\keras\engine\topology.py:1523: UserWarning: The list of outputs passed to the model is redundant. All outputs should only appear once. Found: [<tf.Tensor 'add_2/add:0' shape=(?, 1) dtype=float32>, <tf.Tensor 'multiply_1/mul:0' shape=(?, 1) dtype=float32>, <tf.Tensor 'add_2/add:0' shape=(?, 1) dtype=float32>, <tf.Tensor 'dense_2/Sigmoid:0' shape=(?, 1) dtype=float32>]
' Found: ' + str(self.outputs))
Traceback (most recent call last):
File "C:/Users/Manuel/Dropbox/Masterarbeit/DCPS_BSD_RMS_MONITORING/dcps_bsd_rms_monitoring/velocity_estimation/keras_anns.py", line 213, in <module>
model = pos_recurrent_integrated()
File "C:/Users/Manuel/Dropbox/Masterarbeit/DCPS_BSD_RMS_MONITORING/dcps_bsd_rms_monitoring/velocity_estimation/keras_anns.py", line 199, in pos_recurrent_integrated
main_output = recurrent_unit()(main_input)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python36\lib\site-packages\recurrentshop-1.0.0-py3.6.egg\recurrentshop\engine.py", line 476, in __call__
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python36\lib\site-packages\recurrentshop-1.0.0-py3.6.egg\recurrentshop\engine.py", line 353, in build
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python36\lib\site-packages\recurrentshop-1.0.0-py3.6.egg\recurrentshop\engine.py", line 421, in reset_states
File "C:\Users\Manuel\AppData\Roaming\Python\Python36\site-packages\keras\backend\tensorflow_backend.py", line 680, in zeros
return variable(tf.constant_initializer(0., dtype=tf_dtype)(shape),
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\init_ops.py", line 200, in __call__
self.value, dtype=dtype, shape=shape, verify_shape=verify_shape)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\constant_op.py", line 208, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 380, in make_tensor_proto
if shape is not None and np.prod(shape, dtype=np.int64) == 0:
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\core\fromnumeric.py", line 2566, in prod
out=out, **kwargs)
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\core\_methods.py", line 35, in _prod
return umr_prod(a, axis, dtype, out, keepdims)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
The text was updated successfully, but these errors were encountered:
Moved all your shapes into batch_shape=(batch_size,)+( rest_of_shape)
This could be due to version we have, so this may not be a required adjustment for you, but I had to change the initializer to be same size as hidden state list --> So i changed it to ['zeros', 'zeros', 'zeros']
Doing both of these it ran just fine.
Couple of Notes:
stateful with time-series length of 1 wont even adjust the recurrent weights because it cant propogate through time
All stateful models in keras require shape to be altered to batch_shape
Hello,
I am trying to build a recurrentshop.RecurrentModel() as follows. It builds the graph if
stateful=False
but raises an error whenstateful=True
. Ì worked with stateful RNNs in Keras before without any problems. Is there anything special i need to think of when building stateful RNNs with recurrentshop?Thank you very much.
Code:
Error:
The text was updated successfully, but these errors were encountered: