C3W2A Assignment U-Net Grader Error

Hello everyone, even though every test cell in my code returns “Success”, I continuously get the following grader error:

“Cell #5. Can’t compile the student’s code. Error: TypeError(”‘builtin_function_or_method’ object is not iterable",)"

Here is my code for the graded part:

I will delete my code as soon as I get a review. Sorry for posting code.
What could be the problem? What should be iterable in this case?

Hi Mericy!
I don’t find any errors in your implementation. This problem might be because of including extra cells which originally do not belong to the notebook. Delete those cells before submitting.
Also, please do remove the code. Have a great day.
Regards,
Nithin

1 Like

I wish I had extra cells to delete and resubmit my assignment but there are not any extra cells. Are there any possible causes of this error?

Oh sorry! I’m not sure what is causing you the trouble. Please share your notebook with me (through private chat), let me check it.

1 Like

I have identified the issue, it’s the problem with the CenterCrop function again. There might be a version mismatch. Refer to this post. I would recommend you to follow the direct or normal slicing method as it would work fine (I have submitted both and verified them).
Regards,
Nithin

1 Like

Thanks Nithin! The problem is solved when I used index slicing instead of the pytorch center crop function. It is still a bit weird that everything is fine in the notebook including training but the grader throws an error for the cell #5 which is not the cell where we implement cropping.

I have the same problem when using CenterCrop. It worked when I switched to slicing. However, I think this is still a problem that needs to be addressed. I see this post is two months old yet there is no modification for the notebook to address this bug. This is disappointing.

Hi SosiMusic!
Hope you are doing well. I’m really sorry for making you feel that way. Actually, the fault is at my end as I just solved the issue, but I didn’t report the version mismatch thing to the team.
I will let them know ASAP.
Regards,
Nithin

The error still persists, that means changes have still not been made, extremely disappointing!

Hi Mohammed!
I’m really sorry for the inconvenience that you are facing. I had already created a Git Issue on this, it will be solved soon.

Regards,
Nithin