logo
Browse Source

Update

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 3 years ago
parent
commit
c1351df718
  1. 4
      auto_transformers.py

4
auto_transformers.py

@ -101,7 +101,6 @@ class AutoTransformers(NNOperator):
raise RuntimeError(f'Fail to save as torchscript: {e}.')
elif format == 'onnx':
path = path + '.onnx'
try:
torch.onnx.export(self.model,
tuple(inputs.values()),
@ -129,6 +128,9 @@ class AutoTransformers(NNOperator):
"last_hidden_state": {0: "batch_size"},
"pooler_outputs": {0: "batch_size"}
})
elif format == 'tensorrt':
# os.system('pip install "git+https://github.com/grimoire/torch2trt_dynamic.git"')
pass
else:
log.error(f'Unsupported format "{format}".')

Loading…
Cancel
Save