Torch Cat Concatenation
Torch. cat >>> import torch >>> from torch.autograd import Variable >>> x = Variable(torch.randn(3, 4)) >>> y = Variable(torch.randn(3, 4)) >>> torch.cat((x,y), 1) Variable containing: 0.4833 0.4815 0.7983 2.5368 0.4504 0.1999 [torch.FloatTensor of size 6] torch.cat concatenates along an existing dimension, and so the number of dimensions of the output is the same as the inputs. torch.stack stacks a list of tensors along a new dimension. In that case the number of dimensions of the output is one more than the inputs. Apr 4, 2018
A cat holds a flaming torch while another image shows a torch, a cat, and computer code using `torch.cat`. The joke is a visual pun on PyTorch’s tensor-concatenation function: “torch cat” is interpreted literally as a cat with a torch. It is used as a reaction to programming jokes, accidental wordplay, or absurdly literal interpretations. EN: A cat holds a flaming torch while another image shows a torch, a cat, and computer code using `torch.cat`. The joke is a visual pun on PyTorch’s tensor-concatenation function: “torch cat” is interpreted literally as a cat with a torch. It is used as a reaction to programming jokes, accidental wordplay, or absurdly literal interpretations.
- @profunctor_io / 3359 2019-11-06
- Type
- image
- Size
- 494×373 · 40.4 KiB
- Mood
- absurd, playful
- Language
- en
- Added