0

I am developing an autoencoder for CIFA10 dataset, without adding noise at the input (which is 2nd goal).

The Convnet based autoencoder is not converging: Any suggestions

input_img=Input(shape=(32,32,3))



x=Conv2D(16,(3,3),padding='same',activation='relu')(input_img)

x=MaxPooling2D((2,2),padding='same')(x)

x=Conv2D(8,(3,3),padding='same',activation='relu')(x)

x=MaxPooling2D((2,2),padding='same')(x)

x=Conv2D(8,(3,3),padding='same',activation='relu')(x)

encoded=MaxPooling2D((2,2),padding='same')(x)
x=Conv2D(8,(3,3),padding='same',activation='relu')(encoded)

x=UpSampling2D((2,2))(x)

x=Conv2D(8,(3,3),padding='same',activation='relu')(x)

x=UpSampling2D((2,2))(x)
x=Conv2D(16,(3,3),padding='same',activation='relu')(x) 
x=UpSampling2D((2,2))(x)
decoded=Conv2D(3,(3,3),padding='same',activation='sigmoid')(x)
autoencoder=Model(input_img,decoded)
(x_train,_),(x_test,_)=cifar10.load_data()

x_train=x_train.astype('float32')/255

x_test=x_test.astype('float32')/255

x_train=x_train.reshape(len(x_train),32,32,3)

x_test=x_test.reshape(len(x_test),32,32,3)



autoencoder.compile(optimizer='Adam',loss='binary_crossentropy')
autoencoder.fit(x_train, x_train,

            epochs=50,
            batch_size=64,
            shuffle=True,
            validation_data=(x_test, x_test))

Even for large epochs i get a plateaue of loss

liwei
  • 1
  • 1
  • Thanks for you succinct comment @Jan Kukacka. I need code specific answer. – liwei Mar 22 '19 at 09:20
  • 1
    Stack Overflow is a more appropriate place to ask for code advice. However, I think the tips and tricks in the above mentioned code will help you understand what might be the causes of your problem and how to debug it. – Jan Kukacka Mar 22 '19 at 09:23

0 Answers0