'Keras Error - 'module' object is not callable [duplicate]
I am getting a 'module' object is not callable error for the last line in the following code. Can someone tell me what I am doing wrong here?
from keras.models import Model, Sequential
from keras.layers import Embedding, Flatten, Input, merge
from keras.utils.vis_utils 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)
prod = merge([movie_vec, user_vec], mode = 'mul') # element-wise multiply`
Solution 1:[1]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | olirwin |
