Skip to content

Commit 6044594

Browse files
committed
add dumps json for image
1 parent ad3914b commit 6044594

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

onnx/test/onnx/onnx_img.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ def img2vec(img):
1717
img = Image.open(join(IMG_DIR, 'cat.jpg'))
1818

1919
img_data = transform(img)
20-
import torch
21-
print('img data size', torch.tensor(img_data).size())
22-
2320
vec = img2vec(img)
2421
print('vec', vec)
2522
IMG_NORM = onnx_load('ImgNorm')
2623
print('norm', IMG_NORM.run(None, {'input': img_data})[0])
24+
25+
# from json import dumps
26+
# print(dumps(img_data[0].tolist()))

0 commit comments

Comments
 (0)