Compile GAN , Error in the shape

Hello, Tensoflow community:
I have implemented the perceptual loss function and passed it through the generator, but I have this error when I try to compile. Can some one help me and thanks in advance.



Hi @us_dc, The error you are facing is due to the input shape mismatch and it’s not due to the loss function. The model expects the shape to be (256,256,3) but you are passing (16,16,1). Please try to pass the expected shape to the model. Thank You.