# There was a problem grading your submission. Details: name 'gen' is not defined

**URL:** <https://community.deeplearning.ai/t/there-was-a-problem-grading-your-submission-details-name-gen-is-not-defined/98474>\
**Category:** Introduction to TF for Artificial Intelligence ...\
**Tags:** week-module-4\
**Created:** [February 13, 2022, 11:36am UTC](https://community.deeplearning.ai/t/there-was-a-problem-grading-your-submission-details-name-gen-is-not-defined/98474 "2022-02-13T11:36:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abbas\_Ahmed](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Abbas\_Ahmed](https://community.deeplearning.ai/u/Abbas_Ahmed)\
**Post date:** [February 13, 2022, 11:36am UTC](https://community.deeplearning.ai/t/there-was-a-problem-grading-your-submission-details-name-gen-is-not-defined/98474/1 "2022-02-13T11:36:30Z")

</div>

# Week 4: Handling Complex Images - Happy or Sad Dataset

Model reached at accuracy working very well but after submitting its give error like:  
There was a problem grading your submission. Details:  
name ‘gen’ is not defined

---

<div class="post-metadata">

**Author:** ![a-zarta](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/a-zarta/32/162492_2.png) [@a-zarta](https://community.deeplearning.ai/u/a-zarta)\
**Post date:** [February 14, 2022, 4:27pm UTC](https://community.deeplearning.ai/t/there-was-a-problem-grading-your-submission-details-name-gen-is-not-defined/98474/2 "2022-02-14T16:27:27Z")

</div>

Looks like you are using global variables within your graded functions. You should instead use the parameters defined for each function since the grader will wipe out all global scope.
