alexlee-gk / video_prediction

Stochastic Adversarial Video Prediction
https://alexlee-gk.github.io/video_prediction/
MIT License
303 stars 65 forks source link

ValueError: as_list() is not defined on an unknown TensorShape. #35

Open h9ri opened 5 years ago

h9ri commented 5 years ago

Hi Alex, Iam getting the above error while using pretrained model kth dataset.

h9ri commented 5 years ago

File "scripts/generate.py", line 193, in main() File "scripts/generate.py", line 135, in main model.build_graph(input_phs) File "/home/hari/video_prediction/video_prediction/models/base_model.py", line 478, in build_graph outputs_tuple, losses_tuple, loss_tuple, metrics_tuple = self.tower_fn(self.inputs) File "/home/hari/video_prediction/video_prediction/models/base_model.py", line 412, in tower_fn gen_outputs = self.generator_fn(inputs) File "/home/hari/video_prediction/video_prediction/models/savp_model.py", line 730, in generator_fn gen_outputs_posterior = generator_given_z_fn(inputs_posterior, mode, hparams) File "/home/hari/video_prediction/video_prediction/models/savp_model.py", line 694, in generator_given_zfn outputs, = tf_utils.unroll_rnn(cell, inputs) File "/home/hari/video_prediction/video_prediction/utils/tf_utils.py", line 139, in unroll_rnn swap_memory=False, time_major=True, scope=scope) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/ops/rnn.py", line 618, in dynamic_rnn dtype=dtype) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/ops/rnn.py", line 815, in _dynamic_rnn_loop swap_memory=swap_memory) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3209, in while_loop result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2941, in BuildLoop pred, body, original_loop_vars, loop_vars, shape_invariants) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2878, in _BuildLoop body_result = body(packed_vars_for_body) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3179, in body = lambda i, lv: (i + 1, orig_body(lv)) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/ops/rnn.py", line 786, in _time_step (output, new_state) = call_cell() File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/ops/rnn.py", line 772, in call_cell = lambda: cell(input_t, state) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/ops/rnn_cell_impl.py", line 232, in call return super(RNNCell, self).call(inputs, state) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/layers/base.py", line 329, in call outputs = super(Layer, self).call(inputs, *args, *kwargs) File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/keras/engine/base_layer.py", line 703, in call outputs = self.call(inputs, args, **kwargs) File "/home/hari/video_prediction/video_prediction/models/savp_model.py", line 549, in call kernels = dense(flatten(smallest_layer), np.prod(kernel_shape)) File "/home/hari/video_prediction/video_prediction/ops.py", line 7, in dense input_shape = inputs.get_shape().as_list() File "/home/hari/anaconda3/envs/videoprediction/lib/python3.4/site-packages/tensorflow/python/framework/tensor_shape.py", line 903, in as_list raise ValueError("as_list() is not defined on an unknown TensorShape.")

nishokkumars commented 4 years ago

Is there any fix for this issue? @alexlee-gk

malalejandra commented 4 years ago

Hi, having the same issue :( Has anybody resolved it?

eslambakr commented 4 years ago

Hello, I am facing the same problem too, any updates?

malalejandra commented 4 years ago

Hi @eslambakr , try tensorflow 1.10.0

eslambakr commented 4 years ago

Thanks a lot @malalejandra .It works