shuttie commited on
Commit
80926a4
1 Parent(s): 9cac294

set proper output names

Browse files
Files changed (2) hide show
  1. convert.py +1 -1
  2. pytorch_model.onnx +2 -2
convert.py CHANGED
@@ -13,6 +13,6 @@ inputs = {"input_ids": torch.ones(1, max_seq_length, dtype=torch.int64),
13
  symbolic_names = {0: 'batch_size', 1: 'max_seq_len'}
14
 
15
  torch.onnx.export(model, args=tuple(inputs.values()), f='pytorch_model.onnx', export_params=True,
16
- input_names=['input_ids', 'attention_mask', 'token_type_ids'], output_names=['output'],
17
  dynamic_axes={'input_ids': symbolic_names, 'attention_mask': symbolic_names, 'token_type_ids': symbolic_names})
18
 
 
13
  symbolic_names = {0: 'batch_size', 1: 'max_seq_len'}
14
 
15
  torch.onnx.export(model, args=tuple(inputs.values()), f='pytorch_model.onnx', export_params=True,
16
+ input_names=['input_ids', 'attention_mask', 'token_type_ids'], output_names=['last_hidden_state'],
17
  dynamic_axes={'input_ids': symbolic_names, 'attention_mask': symbolic_names, 'token_type_ids': symbolic_names})
18
 
pytorch_model.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6bdde0dabded044bf81d8945dc92bd4c15328a056c893cb57ef7bbc5cae80dac
3
- size 133694646
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:193801d38a0df71fdb05a1b0ef38a9911527f54536ceb1fe65fa1ae35e6df35a
3
+ size 133694712