Skip to content

Commit 57d3b07

Browse files
committed
1 parent 6044594 commit 57d3b07

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

onnx/export/onnx_export.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ def onnx_export(model, args, **kwds):
3636

3737
# 参考 https://github.com/OFA-Sys/Chinese-CLIP/blob/master/cn_clip/deploy/pytorch_to_onnx.py
3838
def export(txt, img):
39+
3940
onnx_export(txt,
4041
tokenizer(['a photo of cat', 'a image of cat'], ),
4142
input_names=['input', 'attention_mask'],
43+
input_types=[torch.uint32],
44+
output_types=[torch.uint32],
4245
dynamic_axes={
4346
'input': {
4447
0: 'batch',

0 commit comments

Comments
 (0)