Top "Tensor" questions

A tensor is a multi-dimensional array.

TensorFlow: Max of a tensor along an axis

My question is in two connected parts: How do I calculate the max along a certain axis of a tensor? …

python tensorflow deep-learning max tensor
Efficient element-wise multiplication of a matrix and a vector in TensorFlow

What would be the most efficient way to multiply (element-wise) a 2D tensor (matrix): x11 x12 .. x1N ... xM1 xM2 .. …

python tensorflow linear-algebra matrix-multiplication tensor
Concatenate Two Tensors in Pytorch

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 2. Got 32 and 71 in dimension 0 at /pytorch/aten/src/THC/…

python machine-learning deep-learning pytorch tensor
What is a batch in TensorFlow?

The introductory documentation, which I am reading (TOC here) uses the term "batch" (for instance here) without having defined it.

tensorflow machine-learning neural-network deep-learning tensor
How does reduce_sum() work in tensorflow?

I am learning tensorflow, I picked up the following code from the tensorflow website. According to my understanding, axis=0 is …

python tensorflow multidimensional-array reduce tensor
How to use torch.stack function

I have a question about torch.stack I have 2 tensors, a.shape=(2, 3, 4) and b.shape=(2, 3). How to stack them without …

python pytorch tensor
How do I get value of a tensor in PyTorch?

x = torch.tensor([3]) I have a tensor object when I print(x) it gives tensor([3]) x.data[0] gives tensor(3) How …

python pytorch tensor
why do we "pack" the sequences in pytorch?

I was trying to replicate How to use packing for variable-length sequence inputs for rnn but I guess I first …

deep-learning pytorch recurrent-neural-network tensor zero-padding
Pytorch preferred way to copy a tensor

There seems to be several ways to create a copy of a tensor in Pytorch, including y = tensor.new_tensor(…

copy pytorch tensor
How to cast a 1-d IntTensor to int in Pytorch

I get a 1-D IntTensor,but i want to convert it to a integer. I try it by this method: …

pytorch tensor