c.im is one of the many independent Mastodon servers you can use to participate in the fediverse.
C.IM is a general, mainly English-speaking Mastodon instance.

Server stats:

2.8K
active users

#torch

0 posts0 participants0 posts today

Hey, I'm stuck with this PyTorch problem and no one has answered on Stack Overflow yet. Need help creating a new tensor by using values from a 3D tensor as indices for a 1D tensor, efficiently and preferably without loops. Any PyTorch experts around?

stackoverflow.com/q/79389115/2

Boosts appreciated - thanks! 🙏

Stack OverflowHow to map values from a 3D tensor to a 1D tensor in PyTorch?I'm stuck with a Pytorch problem and could use some help: I've got two tensors: A 3D tensor (shape: i, j, j) with integer values from 0 to n A 1D tensor (shape: n) I need to create a new tensor t...

This is a very useful #torch function if your thinking tends to gravitate towards hypernetworks (as mine does for some reason):

pytorch.org/docs/stable/genera

It allows you to call the forward of any module, but to replace all of its parameters by a set of tensors of your own choosing.

The tensors get gradients so they can be derived from some upstream network.

pytorch.orgtorch.func.functional_call — PyTorch 2.5 documentation

The posts going around with various "go bag" ideas have the right idea but I'd throw in this - when buying batteries to go with your torch (flashlight) get ones with a long shelf life. Lithium chemistry AAs can have a 20 year shelf life, and CR123s (different chemistry according to the internet) can go 10.

(on flashlights I'd recommend having at least a pair, one that takes a generally easy to come by cell size like AA, and a good high capacity rechargeable. I am very normal about flashlights)