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

FailedPreconditionError while trying to predict using gan_only model on KTH #34

Open
NagabhushanSN95 opened this issue Jul 29, 2019 · 0 comments

Comments

@NagabhushanSN95
Copy link

NagabhushanSN95 commented Jul 29, 2019

I'm trying to generate videos on KTH dataset using the gan-only pretrained model.
I'm getting the below error

FailedPreconditionError (see above for traceback): Attempting to use uninitialized value generator/encoder/layer_3/InstanceNorm/beta [[node generator/encoder/layer_3/InstanceNorm/beta/read (defined at .../src/video_prediction/video_prediction/layers/normalization.py:129) ]]

I'm attaching the full stack trace below. Please let me know if you need any additional information.

2019-07-29 16:52:32.640421: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA 2019-07-29 16:52:32.682136: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 4008000000 Hz 2019-07-29 16:52:32.682442: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x56082cde0ee0 executing computations on platform Host. Devices: 2019-07-29 16:52:32.682465: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): <undefined>, <undefined> 2019-07-29 16:52:32.682552: I tensorflow/core/common_runtime/process_util.cc:71] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance. Traceback (most recent call last): File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call return fn(*args) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.FailedPreconditionError: Attempting to use uninitialized value generator/encoder/layer_3/InstanceNorm/beta [[{{node generator/encoder/layer_3/InstanceNorm/beta/read}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File ".../src/my_code/VideoPredictor.py", line 487, in <module> main() File ".../src/my_code/VideoPredictor.py", line 481, in main demo6() File ".../src/my_code/VideoPredictor.py", line 466, in demo6 future_length, frame_rate, num_futures) File ".../src/my_code/VideoPredictor.py", line 83, in predict_and_save_videos gen_images = sess.run(model.outputs['gen_images'], feed_dict=feed_dict) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 929, in run run_metadata_ptr) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1152, in _run feed_dict_tensor, options, run_metadata) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run run_metadata) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.FailedPreconditionError: Attempting to use uninitialized value generator/encoder/layer_3/InstanceNorm/beta [[node generator/encoder/layer_3/InstanceNorm/beta/read (defined at .../src/video_prediction/video_prediction/layers/normalization.py:129) ]]

Caused by op 'generator/encoder/layer_3/InstanceNorm/beta/read', defined at: File ".../src/my_code/VideoPredictor.py", line 487, in <module> main() File ".../src/my_code/VideoPredictor.py", line 481, in main demo6() File ".../src/my_code/VideoPredictor.py", line 464, in demo6 model_hparams, batch_size, gpu_mem_frac) File ".../src/my_code/VideoPredictor.py", line 63, in restore_model model.build_graph(input_phs) File ".../src/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 ".../src/video_prediction/video_prediction/models/base_model.py", line 412, in tower_fn gen_outputs = self.generator_fn(inputs) File ".../src/video_prediction/video_prediction/models/savp_model.py", line 710, in generator_fn outputs_posterior = posterior_fn(inputs, hparams) File ".../src/video_prediction/video_prediction/models/savp_model.py", line 29, in posterior_fn image_pairs, nef=hparams.nef, n_layers=hparams.n_layers, norm_layer=hparams.norm_layer) File ".../src/video_prediction/video_prediction/utils/tf_utils.py", line 111, in fn flat_batch_r = flat_batch_fn(flat_batch_x, *args, **kwargs) File ".../src/video_prediction/video_prediction/models/networks.py", line 26, in encoder normalized = norm_layer(convolved) File ".../src/video_prediction/video_prediction/layers/normalization.py", line 129, in fused_instance_norm trainable=trainable) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 182, in func_with_args return func(*args, **current_args) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 350, in model_variable aggregation=aggregation) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 182, in func_with_args return func(*args, **current_args) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 277, in variable aggregation=aggregation) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py", line 1479, in get_variable aggregation=aggregation) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py", line 1220, in get_variable aggregation=aggregation) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py", line 547, in get_variable aggregation=aggregation) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py", line 499, in _true_getter aggregation=aggregation) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py", line 911, in _get_single_variable aggregation=aggregation) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variables.py", line 213, in __call__ return cls._variable_v1_call(*args, **kwargs) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variables.py", line 176, in _variable_v1_call aggregation=aggregation) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variables.py", line 155, in <lambda> previous_getter = lambda **kwargs: default_variable_creator(None, **kwargs) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py", line 2495, in default_variable_creator expected_shape=expected_shape, import_scope=import_scope) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variables.py", line 217, in __call__ return super(VariableMetaclass, cls).__call__(*args, **kwargs) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variables.py", line 1395, in __init__ constraint=constraint) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/variables.py", line 1557, in _init_from_args self._snapshot = array_ops.identity(self._variable, name="read") File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 180, in wrapper return target(*args, **kwargs) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py", line 81, in identity ret = gen_array_ops.identity(input, name=name) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3890, in identity "Identity", input=input, name=name) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper op_def=op_def) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func return func(*args, **kwargs) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op op_def=op_def) File ".../SoftwareFiles/Anaconda/anaconda3/envs/savp/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1801, in __init__ self._traceback = tf_stack.extract_stack()

FailedPreconditionError (see above for traceback): Attempting to use uninitialized value generator/encoder/layer_3/InstanceNorm/beta [[node generator/encoder/layer_3/InstanceNorm/beta/read (defined at .../src/video_prediction/video_prediction/layers/normalization.py:129) ]]

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

1 participant