Pass all the test in improvise jazz assignment but grader says no

It passed all the tests and it got the expected outputs but the grader says this:

Please help as I spend weeks on this

Try restarting the kernel and clearing all the output.
Then run all the cells again, and look at each output cell for any error messages or incorrect results.

I have already done that and I pass all the test results
Get expected output but grader tells me otherwise then when I check the grader comment I see this:

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

I cant fix it
Tried everything, literally passed every assignments except this one for some reason I do not know what it is

Please download your notebook at send it to me via a private message. I’ll check into it.

I just send it to you

Why does your notebook have these two cells?

Your code causes the test case for predict_and_sample() to throw some warnings. Those shouldn’t happen.

I wonder if it is because of all those extra cells you added to your notebook.

The reason why I am using those two cells to avoid this error in history =

I looked up a solution and it was to use tf.compat.v1.disable_eager_execution

What is the fix for this one if i am not using tf.compat ?

Where did you see the instruction to use tf.compat.v1.disable_eager_execution?

ok now it is working
apparently I had remove lambda from djmodel and it passed but now I am getting another error:

Input 0 is incompatible with layer lstm_1: expected shape=(None, None, 90), found shape=[None, 1, 10]')) occurred during function check. We expected function `music_inference_model` to return Test 2 failed```

operands could not be broadcast together with shapes (13,77) (13,90) ')) occurred during function check. We expected function `predict_and_sample` to return Test 3 failed```

Can you help please ?

You’re not supposed to use a Lambda function in this exercise.
Send me your music_inference_model() function via a direct message, and I’ll look it over.