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

error on training #10

Open
vedangmatey opened this issue Nov 8, 2020 · 1 comment
Open

error on training #10

vedangmatey opened this issue Nov 8, 2020 · 1 comment

Comments

@vedangmatey
Copy link

When I run train_val.py i get the following error I am using google colab

ValueError: in user code:

/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:806 train_function  *
    return step_function(self, iterator)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:796 step_function  **
    outputs = model.distribute_strategy.run(run_step, args=(data,))
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:1211 run
    return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2585 call_for_each_replica
    return self._call_for_each_replica(fn, args, kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:2945 _call_for_each_replica
    return fn(*args, **kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:789 run_step  **
    outputs = model.train_step(data)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:757 train_step
    self.trainable_variables)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:2737 _minimize
    trainable_variables))
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/optimizer_v2/optimizer_v2.py:562 _aggregate_gradients
    filtered_grads_and_vars = _filter_grads(grads_and_vars)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/optimizer_v2/optimizer_v2.py:1271 _filter_grads
    ([v.name for _, v in grads_and_vars],))

ValueError: No gradients provided for any variable: ['embedding/embeddings:0', 'dense/kernel:0', 'dense/bias:0', 'lstm/lstm_cell/kernel:0', 'lstm/lstm_cell/recurrent_kernel:0', 'lstm/lstm_cell/bias:0', 'time_distributed/kernel:0', 'time_distributed/bias:0', 'bidirectional/forward_lstm_1/lstm_cell_2/kernel:0', 'bidirectional/forward_lstm_1/lstm_cell_2/recurrent_kernel:0', 'bidirectional/forward_lstm_1/lstm_cell_2/bias:0', 'bidirectional/backward_lstm_1/lstm_cell_3/kernel:0', 'bidirectional/backward_lstm_1/lstm_cell_3/recurrent_kernel:0', 'bidirectional/backward_lstm_1/lstm_cell_3/bias:0', 'dense_2/kernel:0', 'dense_2/bias:0'].
@dabasajay
Copy link
Owner

dabasajay commented Dec 5, 2020

It's a Keras version issue. Please make sure that you're using the right version of libraries as mentioned in the requirements section in Readme.md file. My code was tested on Tensorflow - 1.13.1 & Keras - 2.2.4.

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

2 participants