ydshieh
commited on
Commit
•
860bfc4
1
Parent(s):
7ceff4a
initial commit
Browse files- modeling_tf_my_model.py +13 -0
modeling_tf_my_model.py
CHANGED
@@ -18,3 +18,16 @@ class TFMyModel(TFMyModelPretrainedModel):
|
|
18 |
self.n_layers = config.n_layers
|
19 |
self.hidden_dim = config.hidden_dim
|
20 |
self.linear = tf.keras.layers.Dense(units=config.n_layers)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
self.n_layers = config.n_layers
|
19 |
self.hidden_dim = config.hidden_dim
|
20 |
self.linear = tf.keras.layers.Dense(units=config.n_layers)
|
21 |
+
|
22 |
+
@property
|
23 |
+
def dummy_inputs(self):
|
24 |
+
hidden = tf.zeros(shape=(1, self.config.hidden_dim))
|
25 |
+
dummy_inputs = {"hidden": hidden}
|
26 |
+
return dummy_inputs
|
27 |
+
|
28 |
+
def call(
|
29 |
+
self,
|
30 |
+
hidden,
|
31 |
+
):
|
32 |
+
self.linear(hidden)
|
33 |
+
|