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 had tried to train the R-net model ,but... I get the following error...
"Training...Traceback (most recent call last):
File "train.py", line 80, in
ModelCheckpoint(path, verbose=1, save_best_only=True)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1725, in fit_generator
self._make_train_function()
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 937, in _make_train_function
self.total_loss)
File "/usr/local/lib/python2.7/dist-packages/keras/optimizers.py", line 335, in get_updates
grads = self.get_gradients(loss, params)
File "/usr/local/lib/python2.7/dist-packages/keras/optimizers.py", line 71, in get_gradients
grads = K.gradients(loss, params)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 1210, in gradients
return T.grad(loss, variables)
File "/usr/local/lib/python2.7/dist-packages/theano/gradient.py", line 589, in grad
handle_disconnected(elem)
File "/usr/local/lib/python2.7/dist-packages/theano/gradient.py", line 576, in handle_disconnected
raise DisconnectedInputError(message)
theano.gradient.DisconnectedInputError:
Backtrace when that variable is created:
File "train.py", line 40, in
model = RNet(hdim=args.hdim, dropout_rate=args.dropout, N=None, M=None)
File "/home/lab/Desktop/project/R-NET-in-Keras-master/model.py", line 50, in init
WP_u = SharedWeight(size=(H, 1), name='WP_u')
File "/home/lab/Desktop/project/R-NET-in-Keras-master/SharedWeight.py", line 66, in SharedWeight
input_layer = SharedWeightLayer(**kwargs)
File "/home/lab/Desktop/project/R-NET-in-Keras-master/SharedWeight.py", line 30, in init
regularizer=self.regularizer)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 391, in add_weight
weight = K.variable(initializer(shape), dtype=dtype, name=name)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 148, in variable
strict=False)"
What should I do to fix it?
Thank You
The text was updated successfully, but these errors were encountered:
I had tried to train the R-net model ,but... I get the following error...
"Training...Traceback (most recent call last):
File "train.py", line 80, in
ModelCheckpoint(path, verbose=1, save_best_only=True)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1725, in fit_generator
self._make_train_function()
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 937, in _make_train_function
self.total_loss)
File "/usr/local/lib/python2.7/dist-packages/keras/optimizers.py", line 335, in get_updates
grads = self.get_gradients(loss, params)
File "/usr/local/lib/python2.7/dist-packages/keras/optimizers.py", line 71, in get_gradients
grads = K.gradients(loss, params)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 1210, in gradients
return T.grad(loss, variables)
File "/usr/local/lib/python2.7/dist-packages/theano/gradient.py", line 589, in grad
handle_disconnected(elem)
File "/usr/local/lib/python2.7/dist-packages/theano/gradient.py", line 576, in handle_disconnected
raise DisconnectedInputError(message)
theano.gradient.DisconnectedInputError:
Backtrace when that variable is created:
File "train.py", line 40, in
model = RNet(hdim=args.hdim, dropout_rate=args.dropout, N=None, M=None)
File "/home/lab/Desktop/project/R-NET-in-Keras-master/model.py", line 50, in init
WP_u = SharedWeight(size=(H, 1), name='WP_u')
File "/home/lab/Desktop/project/R-NET-in-Keras-master/SharedWeight.py", line 66, in SharedWeight
input_layer = SharedWeightLayer(**kwargs)
File "/home/lab/Desktop/project/R-NET-in-Keras-master/SharedWeight.py", line 30, in init
regularizer=self.regularizer)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 391, in add_weight
weight = K.variable(initializer(shape), dtype=dtype, name=name)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 148, in variable
strict=False)"
What should I do to fix it?
Thank You
The text was updated successfully, but these errors were encountered: