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

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

Open
h9ri opened this issue Sep 1, 2019 · 6 comments
Open

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

h9ri opened this issue Sep 1, 2019 · 6 comments

Comments

@h9ri
Copy link

h9ri commented Sep 1, 2019

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

@h9ri
Copy link
Author

h9ri commented Sep 1, 2019

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_z_fn
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
Copy link

nishokkumars commented Sep 24, 2019

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

@malalejandra
Copy link

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

@eslambakr
Copy link

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

@malalejandra
Copy link

Hi @eslambakr , try tensorflow 1.10.0

@eslambakr
Copy link

Thanks a lot @malalejandra .It works

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

4 participants