Hi,
I converted my pytorch (.pt) model to onnx using
self.model.cuda().eval()
torch.onnx.export(self.model, dummy_input, "trk.onnx", export_params=True, verbose=True)
and ran it using
model = onnx.load("trk.onnx")
engine = backend.prepare(model, device='CUDA:0')
pred = engine.run(img)[0]
Actual output (.onnx):
pred11 = [[[ 0.0429871 0.10708108 -0.15831867 … -0.05099011 0.04215946 0.03529864]
[ 0.15205492 0.14381851 -0.4134867 … -0.02547888 0.02003362 0.05678646]
[ 0.11788099 0.21649244 -0.49855745 … -0.03875189 -0.00112192 0.05244121]
…
[-0.02988242 -0.02718411 0.17555043 … -0.05482839 -0.03526874 -0.01705099]
[-0.02175785 -0.01682113 0.20047602 … -0.04242673 0.00226362 0.00717632]
[-0.01177015 -0.02307639 0.05427436 … -0.03097095 0.00717672 0.00656337]]] 218 float32
Expected output (.pt):
pred22 = [[[ 4.3859973e+00 3.2662495e+01 8.7064598e+01 … -5.0997593e-02 4.2160533e-02 3.5292290e-02]
[ 4.7508678e+01 4.3868427e+01 6.7454163e+01 … -2.5484795e-02 2.0031789e-02 5.6778252e-02]
[ 7.6021790e+01 6.6031555e+01 6.1953438e+01 … -3.8754154e-02 -1.1225204e-03 5.2439131e-02]
…
[ 3.9146216e+02 4.0653235e+02 2.1454182e+01 … -5.4829646e-02 -3.5270575e-02 -1.7050508e-02]
[ 3.9960834e+02 4.0709204e+02 2.1995722e+01 … -4.2428117e-02 2.2626489e-03 7.1746223e-03]
[ 4.0778818e+02 4.0675439e+02 1.9004044e+01 … -3.0972414e-02 7.1776402e-03 6.5612365e-03]]] 218 float32
First 4 values of each row(bbox values) seems to be different but rest(embeddings) are same.
How can I solve it?
model 4