Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
g207004202
explainable-multimodal-classification
Commits
e62f88a2
Commit
e62f88a2
authored
May 11, 2021
by
Mao, Bojia
Browse files
recorrect onnx
parent
a05f95dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
mmxai/onnx/onnxModel.py
View file @
e62f88a2
...
...
@@ -71,7 +71,7 @@ class ONNXInterface(torch.nn.Module):
if
count
==
3
:
print
(
"Assume it is bert model with only text input"
)
tokens
=
Tokenizer
(
text_input
,
return_tensors
=
"pt"
)
ort_inputs
=
{
k
:
v
.
cpu
().
detach
().
numpy
()
for
k
,
v
in
token
.
items
()}
ort_inputs
=
{
k
:
v
.
cpu
().
detach
().
numpy
()
for
k
,
v
in
token
s
.
items
()}
elif
count
==
2
:
print
(
"Assume image and one text"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment