rohit-gupta/Video2Language

bash run-feature-extractor.sh Error

tjdwo1289 opened this issue · 4 comments

video_input : Tensor("input_1:0", shape=(?, 40, 224, 224, 3), dtype=float32)
convnet_model : <keras.engine.training.Model object at 0x7f84a0613d90>

Traceback (most recent call last):
File "batched_extractor.py", line 153, in
encoded_frame_sequence = TimeDistributed(convnet_model)(video_input)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/base_layer.py", line 460, in call
output = self.call(inputs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/layers/wrappers.py", line 248, in call
y = self.layer.call(inputs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/network.py", line 573, in call
output_tensors, _, _ = self.run_internal_graph(inputs, masks)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/network.py", line 730, in run_internal_graph
output_tensors = to_list(layer.call(computed_tensor, **kwargs))
File "/usr/local/lib/python2.7/dist-packages/keras/layers/normalization.py", line 195, in call
self.momentum),
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 1011, in moving_average_update
x, value, momentum, zero_debias=True)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py", line 70, in assign_moving_average
update_delta = _zero_debias(variable, value, decay)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/moving_averages.py", line 180, in _zero_debias
"biased", initializer=biased_initializer, trainable=False)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 1065, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 962, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 367, in get_variable
validate_shape=validate_shape, use_resource=use_resource)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 352, in _true_getter
use_resource=use_resource)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 664, in _get_single_variable
name, "".join(traceback.format_list(tb))))
ValueError: Variable bn_conv1/moving_mean/biased already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:

File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 1011, in moving_average_update
x, value, momentum, zero_debias=True)
File "/usr/local/lib/python2.7/dist-packages/keras/layers/normalization.py", line 195, in call
self.momentum),
File "/usr/local/lib/python2.7/dist-packages/keras/engine/base_layer.py", line 460, in call
output = self.call(inputs, **kwargs)

Hi @tjdwo1289, may I know what version of Tensorflow and Keras you are using, so I can reproduce the error ? Also do you have a GPU ?

@rohit-gupta

import tensorflow as tf
tf.>>> tf.version
'1.3.0'
import keras
Using TensorFlow backend.
keras.version
'2.2.0'

and i used GPU

@tjdwo1289 This is a known issue with Tensorflow 1.3, other users have solved it by upgrading to TF 1.5 or newer. Please refer to this:

#3 (comment)

@rohit-gupta
Thank you. I will update the tensorflow version and try again.