Comments (3)
Done!!
I solved it by converting the array to double then float rather than 1e-6. Not sure why 1e-6 was mapped to double no matter what I do.
My solution:
@torch.jit.script
def rescoring_mask(scores, mask_pred, masks):
mask_pred_ = mask_pred.float()
factrr = mask_pred_.sum([1, 2]).double()
factrr = factrr + 1e-6
return scores * ((masks * mask_pred_).sum([1, 2]) / factrr.float())
from sparseinst_tensorrt.
Dear @mohamadmansourX, thank you for saying that 😉
Would you mind sharing your ONNX file with me? Such that I can check it out on netron with the verbose output.
On my ONNX, the last Add node I have a the Add_319 which is link to the "rescoring_mask" definition in the sparseinst.py, called line 229. If it is the case, you should be able to change line 21 which define mask_pred_ as a float that could possibily be converted to double.
Let's see from where your Add_398 comes from ...
from sparseinst_tensorrt.
Hello, thank you for your reply.
Yeah as you mentioned, after debugging with netron, the issue is in this line:
Adding the terms mask_pred_.sum([1, 2])
and 1e-6
is causing that issue.
Tried changing 1e-6
to torch.tensor(1e-6).float()
but for some reason it's still being interpreted as a tensor(double)!
from sparseinst_tensorrt.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparseinst_tensorrt.