You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a Pytorch model which is giving >80% accuracy on windows. The prediction scores are within the range of 0 and 1. However, after I convert it to NCNN, it is giving 0 and 1 as scores. I managed to solve this problem by adding a softmax layer:
out = F.softmax(out, dim=1)
Now, the prediction scores are between 0 and 1. But the accuracy is very low.
How can I make the accuracy of NCNN model same as that of Pytorch model?
I converted the model from .pth to .onnx using below method and converted .onnx to .param and .bin using convertmodel.com(without simplifying or optimising).
针对onnx模型转换的各种问题,推荐使用最新的pnnx工具转换到ncnn
In view of various problems in onnx model conversion, it is recommended to use the latest pnnx tool to convert your model to ncnn
Hi,
I created a Pytorch model which is giving >80% accuracy on windows. The prediction scores are within the range of 0 and 1. However, after I convert it to NCNN, it is giving 0 and 1 as scores. I managed to solve this problem by adding a softmax layer:
out = F.softmax(out, dim=1)
Now, the prediction scores are between 0 and 1. But the accuracy is very low.
How can I make the accuracy of NCNN model same as that of Pytorch model?
I converted the model from .pth to .onnx using below method and converted .onnx to .param and .bin using convertmodel.com(without simplifying or optimising).
model=torch.load('model.pth',map_location=torch.device('cpu'))
model.eval()
input_tensor = torch.randn(1, 3, 80, 80 )
exportModel = model
torch.onnx.export(exportModel, input_tensor, 'path' +
('modelNEW.onnx'), export_params=True, input_names=["data"], output_names=["softmax"])
Kindly help. Thanks.
The text was updated successfully, but these errors were encountered: