torch.Tensor — PyTorch 1.10.1 documentation
https://pytorch.org/docs/stable/tensorstorch.ByteTensor. /. 1. Sometimes referred to as binary16: uses 1 sign, 5 exponent, and 10 significand bits. Useful when precision is important at the expense of range. 2. Sometimes referred to as Brain Floating Point: uses 1 sign, 8 exponent, and 7 significand bits. Useful when range is important, since it has the same number of exponent bits ...
torch.add — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.add. Adds other, scaled by alpha, to input. Supports broadcasting to a common shape , type promotion, and integer, float, and complex inputs. input ( Tensor) – the input tensor. other ( Tensor or Number) – the tensor or number to add to input. alpha ( Number) – the multiplier for other. out ( Tensor, optional) – the output tensor.
torch.Tensor.index_add_ — PyTorch 1.10.1 documentation
pytorch.org › torchtorch.Tensor.index_add_. Accumulate the elements of alpha times tensor into the self tensor by adding to the indices in the order given in index. For example, if dim == 0, index [i] == j, and alpha=-1, then the i th row of tensor is subtracted from the j th row of self. The dim th dimension of tensor must have the same size as the length of ...