Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with training #29

Open
jayajackson opened this issue Mar 7, 2018 · 0 comments
Open

Problem with training #29

jayajackson opened this issue Mar 7, 2018 · 0 comments

Comments

@jayajackson
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant