autopool icon indicating copy to clipboard operation
autopool copied to clipboard

Pytorch implementation

Open yuvaramsingh94 opened this issue 5 years ago • 3 comments

Hi , i have created a pytorch implementation for multi-label scenario. pls review and share your comment if this is an acceptable code implementation .

yuvaramsingh94 avatar Aug 01 '20 18:08 yuvaramsingh94

Thanks @yuvaramsingh94, we'll try to get to it ASAP, but just FYI we're short on cycles right now so it might take us some time.

justinsalamon avatar Aug 03 '20 18:08 justinsalamon

You should subtract the max before applying softmax to avoid numerical instability:

https://stackoverflow.com/a/42606665

The authors did this in their implementation.

ljstrnadiii avatar Oct 16 '20 17:10 ljstrnadiii

Thanks for this PR. I'm putting some time into modernizing this library lately, and I'd like to add pytorch support.

That said, there are many things missing from this implementation that makes me think that a rewrite would be easier than a back-and-forth via code review. (Mainly things at the API level, eg target dimension, initialization issues, etc etc.)

I have a local implementation that's a bit closer to what the keras/tf modules look like, but i'm holding off on merging it until we can hit feature parity. I'm actually a bit confused about what the pytorch idiomatic way to implement things like regularization and constraints would be - the documentation and forum posts are almost no help here, so any input would be appreciated.

bmcfee avatar Apr 22 '22 11:04 bmcfee