'What will happen if the user and movie embedding pass through embedding layer in tensorflow neural network

from keras.models import Model, Sequential
from keras.layers import Embedding, Flatten, Input, merge, Dropout, Dense
from keras.optimizers import Adam
from keras.utils.visualize_util import model_to_dot
from IPython.display import SVG

 latent_dim = 10

 movie_input = Input(shape=[1],name='movie-input')
 movie_embedding = Embedding(num_movies + 1, latent_dim, name='movie-embedding') 
 (movie_input)
 movie_vec = Flatten(name='movie-flatten')(movie_embedding)

 user_input = Input(shape=[1],name='user-input')
 user_embedding = Embedding(num_users + 1, latent_dim, name='user-embedding') 
 (user_input)
 user_vec = Flatten(name='user-flatten')(user_embedding)

 concat = merge([movie_vec, user_vec], mode='dot',name='movie-user-concat')
 concat_dropout = Dropout(0.2)(concat)
 fc_1 = Dense(100, name='fc-1', activation='relu')(concat)
 fc_1_dropout = Dropout(0.2, name='fc-1-dropout')(fc_1)
 fc_2 = Dense(50, name='fc-2', activation='relu')(fc_1_dropout)
 fc_2_dropout = Dropout(0.2, name='fc-2-dropout')(fc_2)
 fc_3 = Dense(1, name='fc-3', activation='relu')(fc_2_dropout)



model = Model([user_input, movie_input], fc_3)
model.compile(optimizer=Adam(lr=0.1), 'mean_squared_error')

what will happen if user and movie embedding pass through layer by layer in tensorflow framework what change can we observe layer by layer what is the use of adding an additional layer in the tensorflow framework and can we use other mix and match activation functions like leakyrelu and sigmod is it possible?

How will the tensorflow framework understand the single concatenated vector like all features like movie id,user id and ratings are concatenated in input layer how will the neural network understand and predict the rating? On what basis above framework MLP is treated as Deep learning based frame work



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source