Jazz Improvisation, Week 1 Assignment 3, music_inference_model

Hello, in music_inference_model, I got the “ValueError: Input 0 of layer repeat_vector_1 is incompatible with the layer: expected ndim=2, found ndim=3. Full shape received: [None, 1, 90]” error. I did everything accordingly.
The shape of x before argmax, which I passed the axis as -1, is (None, 1, 90)
The shape of x after argmax is (None, 1)
and after onehot is (None, 1, 90), which surprises me as I cannot use the RepeatVector.
If I delete “RepeatVector”, I can create the model but I got different size of list in unit test “AssertionError: Error in test. The lists contain a different number of elements”. print(len(summary(inference_model)), len(music_inference_model_out)) returns “103, 152”.
If I use “tf.squeeze(x, axis=1)” in order to use RepeatVector, the length of summary(infernece_model) becomes 201.

Can anyone help? I’m stuck with this for almost a week.

Hi Ugur_Horasan,

The shape of x in your code before argmax is correct, but after argmax it should be (None,).

This means that there is something wrong with the parameter you pass into the argmax function or its shape.

Thank you for your response. I was able to handle it by a fresh restart and a re-do.