Commit
•
8eefc04
1
Parent(s):
6f8454f
Update eval_onnx.py (#2)
Browse files- Update eval_onnx.py (25009be5dfd22e189ab977b234d18d4a7e022ce4)
Co-authored-by: Haoliang Tan <haoliangtan@users.noreply.huggingface.co>
- eval_onnx.py +1 -0
eval_onnx.py
CHANGED
@@ -141,6 +141,7 @@ def val_imagenet():
|
|
141 |
val_loader = tqdm(val_loader, file=sys.stdout)
|
142 |
with torch.no_grad():
|
143 |
for batch_idx, (images, targets) in enumerate(val_loader):
|
|
|
144 |
inputs, targets = images.numpy(), targets
|
145 |
ort_inputs = {ort_session.get_inputs()[0].name: inputs}
|
146 |
|
|
|
141 |
val_loader = tqdm(val_loader, file=sys.stdout)
|
142 |
with torch.no_grad():
|
143 |
for batch_idx, (images, targets) in enumerate(val_loader):
|
144 |
+
images = torch.permute(images, (0, 2, 3, 1))
|
145 |
inputs, targets = images.numpy(), targets
|
146 |
ort_inputs = {ort_session.get_inputs()[0].name: inputs}
|
147 |
|