infomax icon indicating copy to clipboard operation
infomax copied to clipboard

An error when running infomax_tiny_imagenet.py

Open kourenmu opened this issue 6 years ago • 4 comments

Hi,

Thanks for your code. When I run infomax_tiny_imagenet.py, I get an error on "x = Conv2D(z_dim / 2**(3-i), kernel_size=(3,3), padding='SAME')(x)" TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64

Do you have any clue why this happens? Thanks in advance.

kourenmu avatar Oct 10 '19 01:10 kourenmu

the reason is you are using python3. i think i have fixed it now.

bojone avatar Oct 10 '19 02:10 bojone

Thanks for your immediate reply. Another error appears "idxs = K.tf.random_shuffle(idxs)" AttributeError: module 'keras.backend' has no attribute 'tf'

p.s., I think z_samples are the global features. Why concatenate z_samples with z_samples in "z_z_1 = Concatenate()([z_samples, z_samples])"? As my understanding, z_samples should be concatenated with the input, am I right?

kourenmu avatar Oct 10 '19 02:10 kourenmu

right. but we also can use z_samples as a representation of the input.

bojone avatar Oct 10 '19 02:10 bojone

right. but we also can use z_samples as a representation of the input.

Thanks

kourenmu avatar Oct 10 '19 12:10 kourenmu