guillermoruiz commited on
Commit
0d303cd
1 Parent(s): b3e7614

Upload TFBilma

Browse files
Files changed (2) hide show
  1. modeling_bilma.py +3 -3
  2. tf_model.h5 +1 -1
modeling_bilma.py CHANGED
@@ -119,13 +119,13 @@ def bilma(num_enc=6, embed_dim=300, max_length=50, num_heads=6, ff_dim=512, voca
119
  if include_top:
120
  fin_output = Dense(vocab_size, use_bias=True, name="bilma/dense_final")(enc_output)
121
  else:
122
- if self.include_head is None:
123
  fin_output = enc_output
124
  else:
125
  x = enc_output
126
- for i, m in enumerate(self.include_head[:-1]):
127
  x = Dense(m, use_bias=True, activation="relu", name=f"bilma/dense_ex_{i}")(x)
128
- fin_output = [Dense(self.include_head[-1], use_bias=True, name=f"bilma/dense_ex_final")(x), enc_output]
129
 
130
  caption_model = Model(inputs=capt_inputs_ids, outputs=fin_output, name="bilma_model")
131
  return caption_model
 
119
  if include_top:
120
  fin_output = Dense(vocab_size, use_bias=True, name="bilma/dense_final")(enc_output)
121
  else:
122
+ if include_head is None:
123
  fin_output = enc_output
124
  else:
125
  x = enc_output
126
+ for i, m in enumerate(include_head[:-1]):
127
  x = Dense(m, use_bias=True, activation="relu", name=f"bilma/dense_ex_{i}")(x)
128
+ fin_output = [Dense(include_head[-1], use_bias=True, name=f"bilma/dense_ex_final")(x), enc_output]
129
 
130
  caption_model = Model(inputs=capt_inputs_ids, outputs=fin_output, name="bilma_model")
131
  return caption_model
tf_model.h5 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f83fdad7da418dac337cc4df40cb630f3145ff66b48188148e899214539e2db5
3
  size 156875820
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56d10c00c39895f8354e27f73dac3b6c4c0d3fcc8b146131c43be64f8868cfbe
3
  size 156875820