Hello,
When running train.py I got this error which raise from deconv2d:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 128, in
main(args)
File "train.py", line 112, in main
model = network(args)
File "/home/hannahbrahman/ADV ML CMPS 290/GANS/ImageCompletion_IncompleteData/network.py", line 16, in init
self.build_model()
File "/home/hannahbrahman/ADV ML CMPS 290/GANS/ImageCompletion_IncompleteData/network.py", line 28, in build_model
self.X_g, self.g_nets = self.completion_net(self.Y_r, name="generator")
File "/home/hannahbrahman/ADV ML CMPS 290/GANS/ImageCompletion_IncompleteData/network.py", line 165, in completion_net
deconv1 = deconv2d(conv8, 4, [self.batch_size, input_shape[1]/2, input_shape[2]/2, 128], name="deconv1")
File "/home/hannahbrahman/ADV ML CMPS 290/GANS/ImageCompletion_IncompleteData/architecture.py", line 50, in deconv2d
strides=[1, 2, 2, 1])
File "/soe/hannahbrahman/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/nn_ops.py", line 1048, in conv2d_transpose
name=name)
File "/soe/hannahbrahman/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 486, in conv2d_backprop_input
data_format=data_format, name=name)
File "/soe/hannahbrahman/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 513, in apply_op
(prefix, dtypes.as_dtype(input_arg.type).name))
TypeError: Input 'input_sizes' of 'Conv2DBackpropInput' Op has type float32 that does not match expected type of int32.
Anyone has any idea to fix?
I have encountered the same problem. Have you solved it?
I have encountered the same problem. Have you solved it?
"Op has type float32 that does not match expected type of int32."
When I convert the codes from Python2 to Python3, I met the same problem.
netwrok.py line 165
deconv1 = deconv2d(conv8, 4, [self.batch_size, input_shape[1]/2, input_shape[2]/2, 128], name="deconv1")
input_shape[1]/2
↓
input_shape[1]//2
problem solved