Week 1 - Assignment 3: Differences between djmodel and music_inference_model?

In the assignment, we build two models. But I want to know the difference between them.

From what the instructions say, djmodel learns the style of the music and predicts the next note and music_inference_model predicts a series of notes using each note’s respective previous note. The wording in the instructions makes it sound like they do the same thing, which is where my confusion comes from.

So, if I’m understanding correctly, djmodel is learning the patterns of the music to know what notes to predict. And music_inference_model uses the learned patterns to predict a note, and then furthermore feeds the predicted note into the next cell. So, it seems like music_inference_model takes the function of djmodel one step further.

(I apologize for the repetitiveness. I had asked a similar question, but deleted it after realizing I misinterpreted the instructions.)

I believe that djmodel is used for training, and the inference model is used for generating new music using the djmodel weights.

That’s what I could gather. But it’s a little odd that we have one model dedicated solely to training.

I’m guessing this is another case of transfer learning. We implement a model to learn the style and predict notes, so we take the parameters to train a similar network.

No, I don’t think that’s what’s happening. There are some global variables that are used to apply the learning from training to making the music predictions.

The keys are in this block of text:

This bit of code is what ties the two parts of the assignment together:

I’m still confused at where I am wrong.

I know the two networks use the same weights and biases, but music_inference_model isn’t exactly the same as djmodel, which is why I said music_inference_model is a similar model. Or are my semantics wrong? That is, this wouldn’t be a case of transfer learning.