# Lesson 5 - user activations and movie activations: order of layers?

Hi, I’m new to the forum and I couldn’t find the answer to this question, so I’m posting it here.

In the movie review example in lesson 5, we created two matrices - one for user activations and the other for movie activations. My question are, are these two matrices separate layers in a simple neural network? If so, which one shows up first? Does it matter?

Hi @jimu_xw,

The collab filter example is slightly different in that it uses 2 parameter matrices side by side (this is slightly different from a conventional NN layer where the outputs of one layer are the inputs of the next layer).

One matrix contains the latent factors for the user and the other matrix contains the latent factors for the item (e.g. movie). These 2 matrices constitute the parameters of your collab filter model.

The latent factors for the user are looked up for each input sample (each input sample contains a user, a movie and a target rating) - the row of latent factors looked up for that user is your user activation; likewise the looked up row for the item in the item latent factors matrix is your item activation.

These latent factors for the user and item are then multiplied together and summed to give a predicted rating by the user for the movie (the predicted rating is then compared with the target rating to compute the loss)

So in a sense they are not separate layers, but work together side by side (one matrix is for the user and the other is for the item).

So they don’t exactly show up one after the other but rather, the activations are computed together (since they are multiplied together and summed).

For reference, see this section on the lecture notes made by @hiromi

Hope this clarifies this concept for you…

Best regards,
Butch