dotnet / TorchSharp

A .NET library that provides access to the library that powers PyTorch.
MIT License
1.41k stars 183 forks source link

Add accumulate to index_put_ #1374

Open BalashovK opened 2 months ago

BalashovK commented 2 months ago

Issue 758 is closed. It says: it you need the 'accumulate' argument on index_put, please open a new issue specifically calling for that.

I need "accumulate" in indexput

My use-case: list of 2D indices with duplicates, which need to be rasterized over 2D canvas, summing up the duplicates. I needed it for 2 projects already (physics & microbiology). So far I have being using a trick with sparse-dense tensor conversion (for some reason, it adds values during the conversion instead of overriding them), but that is an undocumented feature and a questionable long-term solution.

Thank you!

NiklasGustafsson commented 1 month ago

This has not been forgotten. I'm onboarding additional engineering resources at Microsoft, and I'm going to use fixing this bug as a part of that process.