dyelax / Adversarial_Video_Generation

A TensorFlow Implementation of "Deep Multi-Scale Video Prediction Beyond Mean Square Error" by Mathieu, Couprie & LeCun.
MIT License
736 stars 184 forks source link

TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64 #36

Open birdflyto opened 5 years ago

birdflyto commented 5 years ago

Traceback (most recent call last): File "avg_runner.py", line 185, in main() File "avg_runner.py", line 177, in main runner = AVGRunner(num_steps, load_path, num_test_rec) File "avg_runner.py", line 40, in init c.SCALE_FC_LAYER_SIZES_D) File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\d_model.py", line 44, in init self.define_graph() File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\d_model.py", line 65, in define_graph self.scale_fc_layer_sizes[scale_num])) File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\d_scale_model.py", line 43, in init self.define_graph() File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\d_scale_model.py", line 76, in define_graph self.conv_layer_fms[i + 1]])) File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\tfutils.py", line 10, in w return tf.int32(Variable(tf.random.truncated_normal(shape, stddev=stddev))) NameError: name 'Variable' is not defined

C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code>python avg_runner.py --test_dir=F:/zfg/Input/test/ -- name=F:/zfg/output/ --stats_freq=100 --summary_freq=100 --img_save_freq=100 --test_freq=2 --model_save_freq=100 C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1typ e' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1typ e' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1typ e' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1typ e' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1typ e' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1typ e' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) 2019-11-19 11:50:22.962937: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compi led to use: AVX2 Init discriminator... Traceback (most recent call last): File "avg_runner.py", line 185, in main() File "avg_runner.py", line 177, in main runner = AVGRunner(num_steps, load_path, num_test_rec) File "avg_runner.py", line 40, in init c.SCALE_FC_LAYER_SIZES_D) File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\d_model.py", line 44, in init self.define_graph() File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\d_model.py", line 65, in define_graph self.scale_fc_layer_sizes[scale_num])) File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\d_scale_model.py", line 43, in init self.define_graph() File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\d_scale_model.py", line 95, in define_graph self.fc_layer_sizes[i + 1]])) File "C:\Users\tao-he\PycharmProjects\testing-pytorch\combustion\Adversarial_Video_Generation-master\Code\tfutils.py", line 10, in w return tf.Variable(tf.random.truncated_normal(shape, stddev=stddev)) File "C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\ops\random_ops.py", line 178, in truncated_normal shape_tensor, dtype, seed=seed1, seed2=seed2) File "C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\ops\gen_random_ops.py", line 1063, in truncated_normal name=name) File "C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\op_def_library.py", line 626, in _apply_op_helper param_name=input_name) File "C:\Users\tao-he\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\framework\op_def_library.py", line 60, in _SatisfiesTypeConstrain t ", ".join(dtypes.as_dtype(x).name for x in allowed_list))) TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64

hello, thanks for sharing the repo for us,but when i have finished the 1-3 steps and begin to start train on my own datasets,TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64 is coming, even i changed all the dtype into int,the type error still exited. I will appreciate it very much if you can help me with the error.

free-4-ever commented 4 years ago

@birdflyto Hey, I wonder if you could get it solved for I'm facing the exact same problem... 🧐