Week 1 music_inference_model

Why do we need to use music_inference_model function to create another model? Why can’t we use the djmodel to make predictions?
Please help me.
Thanks

One is used for training.
The other is used for predictions.

Keep in mind that the predictions are randomized, otherwise you’d get one possible output, and that wouldn’t be very interesting.

But are not we building a model from scratch in the music_inference_model function? Am I correct thatLSTM_cell we are using in this function is untrained because we are using the same defined cell here? Please clarify these things, I would be grateful to you if you could explain things a bit more. Thanks

There’s only one model in the assignmet, it’s a global resource named “LSTM_cell”.

LSTM_cell is passed to djmodel().

djmodel() is trained by this code:

music_inference_model() uses LSTM_cell to make predictions.

1 Like