Last active
October 4, 2020 16:29
-
-
Save Yash-567/344ad748be4c4d3df1344eb506e38d58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# keras model | |
u = Input(shape=(1,)) | |
m = Input(shape=(1,)) | |
u_embedding = Embedding(N, K)(u) # (N, 1, K) | |
m_embedding = Embedding(M, K)(m) # (N, 1, K) | |
u_embedding = Flatten()(u_embedding) # (N, K) | |
m_embedding = Flatten()(m_embedding) # (N, K) | |
x = Concatenate()([u_embedding, m_embedding]) # (N, 2K) | |
x = Dense(400)(x) | |
x = Activation('relu')(x) | |
x = Dense(1)(x) | |
model = Model(inputs=[u, m], outputs=x) # Function 1 fulfilled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment