OpenLab-NLP commited on
Commit
0ca9e64
·
verified ·
1 Parent(s): 77840d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -136,7 +136,7 @@ class L2NormLayer(layers.Layer):
136
  def call(self, inputs):
137
  return tf.math.l2_normalize(inputs, axis=self.axis, epsilon=self.epsilon)
138
 
139
- class SentenceEncoder(Model):
140
  def __init__(self, vocab_size, embed_dim=EMBED_DIM, latent_dim=LATENT_DIM, max_len=MAX_LEN, pad_id=pad_id, dropout_rate=EMBED_DROPOUT):
141
  super().__init__()
142
  self.pad_id = pad_id
 
136
  def call(self, inputs):
137
  return tf.math.l2_normalize(inputs, axis=self.axis, epsilon=self.epsilon)
138
 
139
+ class SentenceEncoder(tf.keras.Model):
140
  def __init__(self, vocab_size, embed_dim=EMBED_DIM, latent_dim=LATENT_DIM, max_len=MAX_LEN, pad_id=pad_id, dropout_rate=EMBED_DROPOUT):
141
  super().__init__()
142
  self.pad_id = pad_id