I do not see bugs in my code when submitting assignment but grader returns it saying there is error

So I finished my code LSTM jazz improvisation in sequence models
test it
Everything is working fine as I am supposed to pass this and then the grader returns the following errors:

I am not sure why even though everything went fine according to the test and I do not see those errors in my code, if I see them I will fix them but they are not there. I restarted the kernal, I deleted my browser cached but still.

Please help

Code Cell UNQ_C1: Unexpected error (ValueError(‘Your Layer or Model is in an invalid state. This can happen if you are interleaving estimator/non-estimator models or interleaving models/layers made in tf.compat.v1.Graph.as_default() with models/layers created outside of it. Converting a model to an estimator (via model_to_estimator) invalidates all models/layers made before the conversion (even if they were not the model converted to an estimator). Similarly, making a layer or a model inside a a tf.compat.v1.Graph invalidates all layers/models you previously made outside of the graph.’)) occurred during function check. We expected function djmodel to return Test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C2: Unexpected error (ValueError(‘Your Layer or Model is in an invalid state. This can happen if you are interleaving estimator/non-estimator models or interleaving models/layers made in tf.compat.v1.Graph.as_default() with models/layers created outside of it. Converting a model to an estimator (via model_to_estimator) invalidates all models/layers made before the conversion (even if they were not the model converted to an estimator). Similarly, making a layer or a model inside a a tf.compat.v1.Graph invalidates all layers/models you previously made outside of the graph.’)) occurred during function check. We expected function music_inference_model to return Test 2 failed. Please check that this function is defined properly.
Code Cell UNQ_C3: Unexpected error (ValueError(‘Your Layer or Model is in an invalid state. This can happen if you are interleaving estimator/non-estimator models or interleaving models/layers made in tf.compat.v1.Graph.as_default() with models/layers created outside of it. Converting a model to an estimator (via model_to_estimator) invalidates all models/layers made before the conversion (even if they were not the model converted to an estimator). Similarly, making a layer or a model inside a a tf.compat.v1.Graph invalidates all layers/models you previously made outside of the graph.’)) occurred during function check. We expected function predict_and_sample to return Test 3 failed. Please check that this function is defined properly.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.

Were you able to discover what the problem was?

Hi
I am actually discussing this very problem in another thread
The details are there