use proper model output dim
Browse files- onnx_convert.py +2 -2
- pytorch_model.onnx +2 -2
- test-small.json.gz +0 -3
- train-small.json.gz +0 -3
onnx_convert.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
from transformers import AutoTokenizer, AutoModel
|
2 |
import torch
|
3 |
|
4 |
max_seq_length=128
|
5 |
|
6 |
-
model =
|
7 |
model.eval()
|
8 |
|
9 |
inputs = {"input_ids": torch.ones(1, max_seq_length, dtype=torch.int64),
|
|
|
1 |
+
from transformers import AutoTokenizer, AutoModel, AutoModelForSequenceClassification
|
2 |
import torch
|
3 |
|
4 |
max_seq_length=128
|
5 |
|
6 |
+
model = AutoModelForSequenceClassification.from_pretrained(".")
|
7 |
model.eval()
|
8 |
|
9 |
inputs = {"input_ids": torch.ones(1, max_seq_length, dtype=torch.int64),
|
pytorch_model.onnx
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4394678219595bcaef56c0f47453247554c03550e904d55987fe2ec364ec6912
|
3 |
+
size 90996922
|
test-small.json.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:fb557251b12addb55d94af30120d121dfa6391e58bcc4a9aee0f1d35cc2ea1c8
|
3 |
-
size 8522018
|
|
|
|
|
|
|
|
train-small.json.gz
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:9c7c14a8910a3a6c09421a08a84cfc0e74fd198d0aaf43ab2c39250a8ae4e4dd
|
3 |
-
size 19430577
|
|
|
|
|
|
|
|