Views
No views yet
1import numpy
2import onnxruntime as ort
3session = ort.InferenceSession("./bad_crop.onnx")
4blank = numpy.zeros((1, 3, 224, 224), dtype=numpy.float32)
5out = torch.softmax(torch.tensor(session.run(["output"], {"input": blank,})[0][0]), axis=0)
6print(out) # tensor([9.9941e-01, 5.8832e-04]) # Bad crop, good crop