leftthomas / ImageDeblurring

A Keras implementation of image deblurring based on ICCV 2017 paper "Deep Generative Filter for motion deblurring"
82 stars 30 forks source link

how to fix #12

Closed longndmta closed 6 years ago

longndmta commented 6 years ago

@leftthomas

yep! Sorry, i'm beginner. i try to use y = np.ones([2*batch_size, 1]) y[batch_size:, :] = 0

instead of y = [1] batch_size + [0] batch_size

Then d_loss = d.train_on_batch(x, y) is OK!

z = np.ones([batch_size, 1]) When i calling d_on_g_loss = d_on_g.train_on_batch(image_blur_batch,z)

I found Warning that says /path/to/keras/engine/training.py:973: UserWarning: Discrepancy between trainable weights and collected trainable weights, did you set model.trainable without calling model.compile after ? 'Discrepancy between trainable weights and collected trainable'

Thank you for your reply.