The ran the line "python main.py --test_only True --gpu 1 --chk 160 --scale 2 --test_image bsds_test2.jpg" in the terminal.
Error:
File "main.py", line 187, in
net = SRResnet(lr = learning_rate,scale = scale , chk = chk)
File "main.py", line 164, in init
output = Convolution2D(filters =3 , kernel_size=(3,3) , strides=(1 , 1) , padding='same')(output)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/engine/base_layer.py", line 463, in call
self.build(unpack_singleton(input_shapes))
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/layers/convolutional.py", line 141, in build
constraint=self.kernel_constraint)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/engine/base_layer.py", line 279, in add_weight
weight = K.variable(initializer(shape, dtype=dtype),
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/initializers.py", line 227, in call
dtype=dtype, seed=self.seed)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 4357, in random_uniform
shape, minval=minval, maxval=maxval, dtype=dtype, seed=seed)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/keras/backend.py", line 5253, in random_uniform
shape, minval=minval, maxval=maxval, dtype=dtype, seed=seed)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/ops/random_ops.py", line 247, in random_uniform
rnd = gen_random_ops.random_uniform(shape, dtype, seed=seed1, seed2=seed2)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/ops/gen_random_ops.py", line 820, in random_uniform
name=name)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 626, in _apply_op_helper
param_name=input_name)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 60, in _SatisfiesTypeConstraint
", ".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.
I Tried to remove as well as find the source of the problem but failed to do so. Kindly help me resolve the issue
It must be an issue with old TensorFlow version. Would recommend to use newer version Keras, transfer the code and then use the weights provided. Transferring the code should not be an issue.
The ran the line "python main.py --test_only True --gpu 1 --chk 160 --scale 2 --test_image bsds_test2.jpg" in the terminal.
Error: File "main.py", line 187, in
net = SRResnet(lr = learning_rate,scale = scale , chk = chk)
File "main.py", line 164, in init
output = Convolution2D(filters =3 , kernel_size=(3,3) , strides=(1 , 1) , padding='same')(output)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/engine/base_layer.py", line 463, in call
self.build(unpack_singleton(input_shapes))
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/layers/convolutional.py", line 141, in build
constraint=self.kernel_constraint)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/engine/base_layer.py", line 279, in add_weight
weight = K.variable(initializer(shape, dtype=dtype),
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/initializers.py", line 227, in call
dtype=dtype, seed=self.seed)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 4357, in random_uniform
shape, minval=minval, maxval=maxval, dtype=dtype, seed=seed)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/keras/backend.py", line 5253, in random_uniform
shape, minval=minval, maxval=maxval, dtype=dtype, seed=seed)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/ops/random_ops.py", line 247, in random_uniform
rnd = gen_random_ops.random_uniform(shape, dtype, seed=seed1, seed2=seed2)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/ops/gen_random_ops.py", line 820, in random_uniform
name=name)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 626, in _apply_op_helper
param_name=input_name)
File "/home/dip_student/miniconda3/envs/pra36/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 60, in _SatisfiesTypeConstraint
", ".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.
I Tried to remove as well as find the source of the problem but failed to do so. Kindly help me resolve the issue