Hi,
Ive written the below code in my notebook
However, I’m getting an assertion error when I’m getting tested by
#UNIT TEST
inference_summary = summary(inference_model)
comparator(inference_summary, music_inference_model_out)
I’ve tried looking deeper and printed the items inside “inference_summary” and “music_inference_model_out” (the later is the “correct answer on which we’re graded”). What I figured out is that my model is not creating the layers of this kind
[‘TensorFlowOpLayer’, [(None,)], 0]
Here is a snipped of my output when I was comparing the two:
print(len(summary(inference_model)))
for i in summary(inference_model):
print(i)
54
['InputLayer', [(None, 1, 90)], 0]
['InputLayer', [(None, 64)], 0]
['InputLayer', [(None, 64)], 0]
['LSTM', [(None, 64), (None, 64), (None, 64)], 39680, [(None, 1, 90), (None, 64), (None, 64)], 'tanh']
['Dense', (None, 90), 5850, 'softmax']
['RepeatVector', (None, 1, 90), 0, 1]
['RepeatVector', (None, 1, 90), 0, 1]
['RepeatVector', (None, 1, 90), 0, 1]
['RepeatVector', (None, 1, 90), 0, 1]
Which I compared to this:
print(len(music_inference_model_out))
for i in music_inference_model_out:
print(i)
152
['InputLayer', [(None, 1, 90)], 0]
['InputLayer', [(None, 64)], 0]
['InputLayer', [(None, 64)], 0]
['LSTM', [(None, 64), (None, 64), (None, 64)], 39680, [(None, 1, 90), (None, 64), (None, 64)], 'tanh']
['Dense', (None, 90), 5850, 'softmax']
['TensorFlowOpLayer', [(None,)], 0]
['TensorFlowOpLayer', [(None, 90)], 0]
['RepeatVector', (None, 1, 90), 0, 1]
['TensorFlowOpLayer', [(None,)], 0]
Can someone please explain what I’m doing wrong here?
Thanks and good luck to all of you on your assignements.
Karim