Commit a05f95dd authored by Mao, Bojia's avatar Mao, Bojia
Browse files

recorrect onnx

parent b397963d
......@@ -107,9 +107,9 @@ class ONNXInterface(torch.nn.Module):
if image_tensor != None:
logits = self.onnx_model_forward(image_tensor,text_input)
else:
p = transforms.Compose([transforms.Scale((224,224))])
image,i = imsc(p(image),quiet=True)
image_tensor = torch.reshape(image, (1,3,224,224))
p = transforms.Compose([transforms.Scale((224,224))])
image,i = imsc(p(image),quiet=True)
image_tensor = torch.reshape(image, (1,3,224,224))
logits = self.onnx_model_forward(image_tensor,text_input)
if list(torch.tensor(logits).size()) != [1, 2]:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment