jatinchowdhury18 / RTNeural

Real-time neural network inferencing
BSD 3-Clause "New" or "Revised" License
582 stars 58 forks source link

Add support for Torch's Conv1d strides and ConvTranspose1d #145

Closed fcaspe closed 6 days ago

fcaspe commented 1 week ago

Hi Jatin!

This library is really awesome, I have been using it for low latency inference of big convolutional autoencoders, so I have implemented the 1d Transposed Convolution and convolutional strides.

I know these new functionalities are not fully incorporated into the library. For instance, strides are still missing in Conv1DT and the non-streaming versions of Conv1D and Conv2D. Let me know what you think about these additions and I will be happy to improve them so that hopefully they can be integrated into the library!

Best, Franco

jatinchowdhury18 commented 1 week ago

Also linking issue #144 for visibility.

fcaspe commented 1 week ago

Sounds good! The stride counter idea sounds great! Feel free to push changes and I'll also take a look at that!

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.76%. Comparing base (a8ae9c5) to head (717df48). Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
RTNeural/torch_helpers.h 89.47% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #145 +/- ## ========================================== - Coverage 95.70% 94.76% -0.95% ========================================== Files 58 40 -18 Lines 3892 2578 -1314 ========================================== - Hits 3725 2443 -1282 + Misses 167 135 -32 ``` | [Flag](https://app.codecov.io/gh/jatinchowdhury18/RTNeural/pull/145/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/jatinchowdhury18/RTNeural/pull/145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `94.76% <95.00%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jatinchowdhury18 commented 1 week ago

Alright, I think I've made all the changes that I want to make... Still need to do a pass for cleanup and documentation, but if @fcaspe wants to have another look and make sure I didn't mess things up too bad, that would be much appreciated :).

fcaspe commented 6 days ago

Just reviewed. The 'StridedConv1d` class is a good idea. The examples look good and cleaner than mine. I also tried on the conv models I am developing and they are working ok with this new version!

jatinchowdhury18 commented 6 days ago

@fcaspe Awesome! I'm going to go ahead and merge this PR.