Spaces:
Runtime error
Runtime error
Update cnnrnn.py
Browse files
cnnrnn.py
CHANGED
@@ -35,10 +35,10 @@ from nltk.translate.bleu_score import sentence_bleu
|
|
35 |
def getModel():
|
36 |
embedding_matrix_vocab = np.load('my_embedding_matrix.npy')
|
37 |
|
38 |
-
input1 = Input(shape=(2048
|
39 |
dense1 = Dense(256, kernel_initializer=tf.keras.initializers.glorot_uniform(seed = 56), name='dense_encoder')(input1)
|
40 |
|
41 |
-
input2 = Input(shape=(153
|
42 |
embedding_layer = Embedding(input_dim = 1427, output_dim = 300, input_length=153, mask_zero=True, trainable=False,
|
43 |
weights=[embedding_matrix_vocab], name="Embedding_layer")
|
44 |
emb = embedding_layer(input2)
|
|
|
35 |
def getModel():
|
36 |
embedding_matrix_vocab = np.load('my_embedding_matrix.npy')
|
37 |
|
38 |
+
input1 = Input(shape=(2048), name='Image_input')
|
39 |
dense1 = Dense(256, kernel_initializer=tf.keras.initializers.glorot_uniform(seed = 56), name='dense_encoder')(input1)
|
40 |
|
41 |
+
input2 = Input(shape=(153), name='Text_Input')
|
42 |
embedding_layer = Embedding(input_dim = 1427, output_dim = 300, input_length=153, mask_zero=True, trainable=False,
|
43 |
weights=[embedding_matrix_vocab], name="Embedding_layer")
|
44 |
emb = embedding_layer(input2)
|