Tensorflow Type Error: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64
这个其实不是问题,是TensorFlow版本的原因,在TensorFlow1.7会报错,以前的版本无影响。
将其转为int型就行了。
The error raises in the following line:
self.h0 = tf.reshape(self.z,[-1, sample_H16, sample_W16, self.gen_dimension * 8])
cast to int the parameters that may not be:
self.h0 = tf.reshape(self.z,[-1, sample_H16, sample_W16, int(self.gen_dimension * 8)])
int(self.gen_dimension * 8)])
我当时是padding提示一样的错误,不是shape。但是你根据你Python错误提示,找到错误代码,按照上面强转就OK了