C1W1_Your_First_GAN_test_gen_block

This test_gen_block method is giving error:

Hi @Sampada_Tavse,
It looks like you still have None values in the section between #### START CODE HERE #### and #### END CODE HERE. You’re supposed to replace those Nones with your code.

Okk, got it. It is working. Now next problem- in next cell, not getting what needs to be done:

Progress :slight_smile:

When the error says a line is outside the function, it usually means the line is not indented properly - which looks like exactly what we’re seeing in your screenshot. The return line you got the error for: return self.gen(noise) is not indented to align with the other contents of the forward() function, so Python doesn’t realize it’s supposed to be part of that function. You probably accidentally removed the indentation for that line, so you just need to add it back in.

In general, you should only be changing code within the

#### START CODE HERE ####
...
#### END CODE HERE ####

sections. And you need to be careful about indentations because Python relies on it heavily.

Good luck!

Thanks a ton Wendy​:pray:. You are the biggest support.

1 Like