Code Monkey home page Code Monkey logo

Comments (5)

hancyran avatar hancyran commented on June 2, 2024

Thanks for your support! I am sorry I did not ever convert the models into ONNX format, and I am not sure which specific task you are focusing on, but if you wanna use the pytorch model in tensorflow or so, you could consider manually storing the pretrained weights from the dict after loading the .pth files. Then, you need to load the weights into the modules (like nn.conv or nn.linear) of the DL lib you would like to use in a compatible way. The custom pointops kernels work for data/feature processing, so they are sperate from these learnable modules, but if you do not use pytorch lib, you may have to rewrite these kernels to ensure a similar process.

For classification, you could remove the flag "--cuda_ops" to replace the custom kernels with pure pytorch version. But for segmentation, you have to use the kernels for grid sampling.

from repsurf.

jelenab98 avatar jelenab98 commented on June 2, 2024

Hi,
thanks for the answer. I want to run the inference on segmentation task from the C++. I thought that the cleanest way is to convert the model to ONNX and then just invoke the forward pass from the C++ script but ONNX has some troubles with custom cuda kernels.

from repsurf.

hancyran avatar hancyran commented on June 2, 2024

I am not familiar with ONNX lib, but I think it would be a good news to rewrite the kernels as the kernel files (.cu) are written in a style very similar to c++. Maybe you can try working on it.

from repsurf.

jelenab98 avatar jelenab98 commented on June 2, 2024

Will look into it. Thanks!

from repsurf.

hancyran avatar hancyran commented on June 2, 2024

Thanks for your support! I will close the issue

from repsurf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.