Commit
•
8527d26
1
Parent(s):
7f0cd5b
Upload TFBilma
Browse files- modeling_bilma.py +6 -3
- tf_model.h5 +1 -1
modeling_bilma.py
CHANGED
@@ -9,7 +9,7 @@ from typing import Dict
|
|
9 |
import re
|
10 |
import unicodedata
|
11 |
|
12 |
-
from
|
13 |
|
14 |
# copied from preprocessing.py
|
15 |
BLANK = ' '
|
@@ -71,10 +71,13 @@ class TFBilma(TFPreTrainedModel):
|
|
71 |
return sig
|
72 |
|
73 |
|
74 |
-
def call(self,
|
75 |
#if isinstance(tensor, dict) and len(tensor) == 0:
|
76 |
# return self.model(self.dummy_inputs)
|
77 |
-
|
|
|
|
|
|
|
78 |
|
79 |
|
80 |
#
|
|
|
9 |
import re
|
10 |
import unicodedata
|
11 |
|
12 |
+
from configuration_bilma import BilmaConfig
|
13 |
|
14 |
# copied from preprocessing.py
|
15 |
BLANK = ' '
|
|
|
71 |
return sig
|
72 |
|
73 |
|
74 |
+
def call(self, inputs):
|
75 |
#if isinstance(tensor, dict) and len(tensor) == 0:
|
76 |
# return self.model(self.dummy_inputs)
|
77 |
+
ins = tf.cast(inputs["input_ids"], tf.float32)
|
78 |
+
|
79 |
+
output = {"logits":self.model(ins)}
|
80 |
+
return output
|
81 |
|
82 |
|
83 |
#
|
tf_model.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 156564220
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae6a05836d990960fb2c4a9fa4616d18e0c396c2e075f85cc98d1ab8aecdc7a0
|
3 |
size 156564220
|