ydshieh
commited on
Commit
•
7ceff4a
1
Parent(s):
7350e48
initial commit
Browse files- modeling_tf_my_model.py +1 -7
modeling_tf_my_model.py
CHANGED
@@ -2,7 +2,7 @@ import tensorflow as tf
|
|
2 |
|
3 |
from transformers.modeling_tf_utils import TFPreTrainedModel
|
4 |
|
5 |
-
from configuration_my_model import MyModelConfig
|
6 |
|
7 |
|
8 |
class TFMyModelPretrainedModel(TFPreTrainedModel):
|
@@ -18,9 +18,3 @@ 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)
|
21 |
-
|
22 |
-
|
23 |
-
config = MyModelConfig()
|
24 |
-
model = TFMyModel(config)
|
25 |
-
print(model)
|
26 |
-
model.save_pretrained("my_model")
|
|
|
2 |
|
3 |
from transformers.modeling_tf_utils import TFPreTrainedModel
|
4 |
|
5 |
+
from .configuration_my_model import MyModelConfig
|
6 |
|
7 |
|
8 |
class TFMyModelPretrainedModel(TFPreTrainedModel):
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
|