Gen has incorrect type/hist has incorrect type

My code is compilled successfully but when I submitted then its gives error:
Failed test case: gen has incorrect type.
Expected:
<class ‘keras.preprocessing.image.DirectoryIterator’>,
but got:
<class ‘NoneType’>.

Failed test case: hist has incorrect type.
Expected:
<class ‘keras.callbacks.History’>,
but got:
<class ‘NoneType’>.

Please click my name and message your notebook as an attachment.

Sir I have submitted my week 4 assignment of Introduction to tensorflow through AI,ML and deep learning Although I submitted correct assignment but it shows always 0 grade I think there is some fault in it please resolve my issue sir as soon as possible as it effects my credits

You seem to have changed certain cells which should’ve been left untouched.
For instance, this is the original code for the assignment:

if not "accuracy" in hist.model.metrics_names:
    print("Use 'accuracy' as metric when compiling your model.")
else:
    print("The metric was correctly defined.")

You have:

if not 'acc' in hist.model.metrics_names:
    print("Use 'acc' as metric when compiling your model.")
else:
    print("The metric was correctly defined.")

Please don’t add / remove:

  1. Notebook cells
  2. print statements
  3. Function parameters
  4. Imports

Don’t:

  1. Rename functions / change return type
  2. Rename global variables

Fill your code where instructed, using local variables when possible.
I recommend you try again by following instructions in Refresh your Lab Workspace section in this link.

this doesn’t work still getting same error

Please click my name and message your notebook as an attachment.

There were 2 issues:

  1. The notebook didn’t have the right metadata. So, the workspace had to be refreshed.
  2. The loss was incorrect.