C1W2 Build Basic Generative Adversarial Networks (GANs) - C3 ERROR

When creating a post, please add:

  • Week # must be added in the tags option of the post.
  • Link to the classroom item you are referring to:
  • Description (include relevant info but please do not post solution code or your entire notebook):
    (Please note: I removed any code from the post, but it is filled in)

Here is the error:
Code Cell UNQ_C3: Class ‘Discriminator’ - method ‘make_disc_block’ is incorrect. Check implementation.

I have the provided GAN setup, but I am getting this persistent error in the grading , training runs all the epochs and the images look good… won’t pass the grading due to error. I guess there is something wrong in the implementation, but I can’t figure out what it is. If someone could possibly provide some insight, that would be greatly appreciated. Thank you. here is the outline…

UNQ_C3 (UNIQUE CELL IDENTIFIER, DO NOT EDIT)

GRADED FUNCTION: Discriminator

Discriminator class
init
def make_disc_block
def make_disc_block

    # Build the neural block
    if not final_layer:
        return nn.Sequential(
            #### START CODE HERE #### #

            #### END CODE HERE ####
        )
    else: # Final Layer
        return nn.Sequential(
            #### START CODE HERE #### #

            #### END CODE HERE ####
        )

def forward(self, image)
disc_pred = self.disc(image)
return disc_pred.view(len(disc_pred), -1)

Code Cell UNQ_C3: Class ‘Discriminator’ - method ‘make_disc_block’ is incorrect. Check implementation.

And you’re sure that everything passes when you run the local tests in the notebook? If so, then we’ll probably need to go to “plan B” and look at your actual code, but we can’t do that in a public thread. I’ll send you a Direct Message about how to proceed with that.

I’m facing the same issue here…

Please check your “DMs” for a message from me about how to proceed with this. You can recognize DMs in your feed by the “envelope” icon.