admin管理员组文章数量:1355703
I'm currently using broadcasting, given a 3D pytorch tensor of shape 32 x 15000 by (128*batch_size) (huge, I know. Cannot shrink this) to generate a histogram for each 32x15000 array. I am storing lowers and uppers for each to easily bin using broadcasting.
Is there a torch.histogram alternative that will let me do this instead? broadcasting consumes huge amounts of memory as the mask ends up being 32 x 15000 x (128batch_sizebins) and I cannot fit this in VRAM.
Any suggestions would be welcome. I'm currently getting around the issue by iteratively handling each bin, but that leads to massive speed losses.
本文标签: pythonPytorch Histogram but only one dimension in 3D tensorStack Overflow
版权声明:本文标题:python - Pytorch Histogram- but only one dimension in 3D tensor - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744017323a2576569.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论