Hi, I have tried multiple times but could not pass the third and forth test cases. I strictly followed the instructions but something went wrong. Here is my code.
Hi Caixinlei!
I hope that you are doing well. Well, to be honest, I cannot and I’m not supposed to give you the correct code. But I can point out where you are going wrong.
I guess you didn’t check/read the description of the parameters given in the function properly or carefully.
It says this for “adversarial criterion” and “reconstruction criterion” parameters::
adv_criterion: the adversarial loss function; takes the discriminator
predictions and the true labels and returns an adversarial
loss (which you aim to minimize recon_criterion: the reconstruction loss function; takes the generator
outputs and the real images and returns a reconstruction
loss (which you aim to minimize)
Now please check the parameters that you have passed to the recon_criterion function. You have passed the real/fake prediction matrix returned from the generator and real images whereas the correct parameters should be the generator’s output and the real images.
Also, this assignment belongs to week 2 (C3W2B Assignment) so I have modified the tag too.