suraj-maniyar / Deep-Visual-Attention-Prediction

Keras implementation of paper 'Deep Visual Attention Prediction' which predicts human eye fixation on view-free scenes.
https://ieeexplore.ieee.org/document/8240654/
21 stars 10 forks source link

Error with keras implementation #4

Open Wmir opened 4 years ago

Wmir commented 4 years ago

First of all Thankyou for sharing your code on GitHub. I am fairly new with Keras and I tried your code on google Colab but I am getting an error after running the cell i.e. hist_obj = deconvNet.Train(). The error is "ValueError: No gradients provided for any variable:"

The complete error is as follow:

ValueError: in user code:

/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:571 train_function  *
    outputs = self.distribute_strategy.run(
/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py:951 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:2290 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:2649 _call_for_each_replica
    return fn(*args, **kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:541 train_step  **
    self.trainable_variables)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:1804 _minimize
    trainable_variables))
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/optimizer_v2/optimizer_v2.py:521 _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:1219 _filter_grads
    ([v.name for _, v in grads_and_vars],))

ValueError: No gradients provided for any variable: ['conv2d/kernel:0', 'conv2d/bias:0', 'conv2d_1/kernel:0', 'conv2d_1/bias:0', 'conv2d_2/kernel:0', 'conv2d_2/bias:0', 'conv2d_3/kernel:0', 'conv2d_3/bias:0', 'conv2d_4/kernel:0', 'conv2d_4/bias:0', 'conv2d_5/kernel:0', 'conv2d_5/bias:0', 'conv2d_6/kernel:0', 'conv2d_6/bias:0', 'conv2d_7/kernel:0', 'conv2d_7/bias:0', 'conv2d_8/kernel:0', 'conv2d_8/bias:0', 'conv2d_9/kernel:0', 'conv2d_9/bias:0', 'conv2d_10/kernel:0', 'conv2d_10/bias:0', 'conv2d_11/kernel:0', 'conv2d_11/bias:0', 'conv2d_12/kernel:0', 'conv2d_12/bias:0', 'conv2d_transpose/kernel:0', 'conv2d_transpose/bias:0', 'conv2d_transpose_1/kernel:0', 'conv2d_transpose_1/bias:0', 'conv2d_transpose_4/kernel:0', 'conv2d_transpose_4/bias:0', 'conv2d_transpose_2/kernel:0', 'conv2d_transpose_2/bias:0', 'conv2d_transpose_5/kernel:0', 'conv2d_transpose_5/bias:0', 'conv2d_transpose_7/kernel:0', 'conv2d_transpose_7/bias:0', 'conv2d_transpose_3/kernel:0', 'conv2d_transpose_3/bias:0', 'conv2d_transpose_6/kernel:0', 'conv2d_transpose_6/bias:0', 'conv2d_transpose_8/kernel:0', 'conv2d_transpose_8/bias:0', 'conv2d_13/kernel:0', 'conv2d_13/bias:0', 'conv2d_14/kernel:0', 'conv2d_14/bias:0', 'conv2d_15/kernel:0', 'conv2d_15/bias:0', 'conv2d_16/kernel:0', 'conv2d_16/bias:0', 'ba1c/gamma:0', 'ba1c/beta:0', 'ba2c/gamma:0', 'ba2c/beta:0', 'ba3c/gamma:0', 'ba3c/beta:0', 'bafc/gamma:0', 'bafc/beta:0'].
alokssingh commented 4 years ago

%tensorflow_version 1.x run this after mounting the derive.

Wmir commented 4 years ago

Thanks a lot for the help. it worked

alokssingh commented 4 years ago

Your welcome @Wmir. It will work in google colab but I don't how to solve this problem in loacl system.

Wmir commented 4 years ago

Hi @alokssingh many thanks again for the help, I managed to run the complete code. However in the end, I am getting predictions with kind of blank screens. Please see my output result below. I would really appreciate your help.

output:

image

alokssingh commented 4 years ago

@Wmir I have no idea regarding this problem. Sorry

Ttrariana commented 4 years ago

Hi @Wmir Sorry to bother,I don‘t know where the training data set is in the code.Could you tell me how to get this data set?Thanks a lot.

Ttrariana commented 4 years ago

Hi @alokssingh many thanks again for the help, I managed to run the complete code. However in the end, I am getting predictions with kind of blank screens. Please see my output result below. I would really appreciate your help.

output:

image

Have you figure out the problem?If you have,I need your help now,please reply to me.