vm.torch

Classes

class device : Represent the device spec.

class dtype : The basic data type.

class enable_grad : Context-manager to enable gradient calculation.

class no_grad : Context-manager to disable gradient calculation.

class set_grad_enabled : Context-manager to set gradient calculation on or off.

class Size : Represent the a sequence of dimensions.

class Tensor : A multi-dimensional array containing elements of a single data type.

Functions

abs(…) : Compute the absolute value of input.

add(…) : Compute the element-wise addition.

addmm(…) : Add input to the result of matrix-matrix multiplication.

arange(…) : Return a tensor of evenly spaced values within a interval.

argmax(…) : Return the index of maximum elements along the given dimension.

argmin(…) : Return the index of minimum elements along the given dimension.

argsort(…) : Return the index of sorted elements along the given dimension.

baddbmm(…) : Add input to the result of batched matrix-matrix multiplication.

bitwise_and(…) : Compute the element-wise AND bitwise operation.

bitwise_not(…) : Compute the element-wise NOT bitwise operation.

bitwise_or(…) : Compute the element-wise OR bitwise operation.

bitwise_xor(…) : Compute the element-wise XOR bitwise operation.

bmm(…) : Compute the batched matrix-matrix multiplication.

cat(…) : Concatenate the inputs along the given dimension.

ceil(…) : Compute the smallest integer not less than input.

channel_affine(…) : Apply affine transformation to each channel of input.

channel_normalize(…) : Apply normalization to each channel of input.

chunk(…) : Split input into a specific number of chunks.

clamp(…) : Compute the clipped input according to the given bounds.

cos(…) : Compute the cos of input.

cumsum(…) : Compute the cumulative sum of elements along the given dimension.

div(…) : Compute the element-wise division.

empty(…) : Return a tensor filled with uninitialized data.

eq(…) : Compute the element-wise equal comparison.

exp(…) : Compute the exponential of input.

eye(…) : Return a tensor constructed as the identity matrix.

flatten(…) : Return a tensor with dimensions flattened.

flip(…) : Reverse elements along the given dimension.

fliplr(…) : Reverse elements along the second dimension.

flipud(…) : Reverse elements along the first dimension.

floor(…) : Compute the largest integer not greater than input.

from_numpy(…) : Create a tensor converting from the given numpy array.

full(…) : Return a tensor filled with a scalar.

full_like(…) : Return a tensor filled with a scalar with size as input.

gather(…) : Gather elements along the given dimension of index.

ge(…) : Compute the element-wise greater-equal comparison.

gt(…) : Compute the element-wise greater comparison.

index_select(…) : Select elements along the given dimension using index.

isinf(…) : Check if the elements of input are infinite.

isnan(…) : Check if the elements of input are NaN.

le(…) : Compute the element-wise less-equal comparison.

linspace(…) : Generate evenly spaced values within intervals along the given dimension.

log(…) : Compute the natural logarithm of input.

logical_and(…) : Compute the element-wise AND logical operation.

logical_not(…) : Compute the element-wise NOT logical operation.

logical_or(…) : Compute the element-wise OR logical operation.

logical_xor(…) : Compute the element-wise XOR logical operation.

logsumexp(…) : Apply the composite of log, sum, and exp to input.

lt(…) : Compute the element-wise less comparison.

masked_select(…) : Select the input elements where mask is true.

matmul(…) : Compute the matrix multiplication.

max(…) : Compute the max value of elements along the given dimension.

maximum(…) : Compute the maximum value of inputs.

mean(…) : Compute the mean value of elements along the given dimension.

min(…) : Compute the min value of elements along the given dimension.

minimum(…) : Compute the minimum value of inputs.

mm(…) : Compute the matrix-matrix multiplication.

mul(…) : Compute the element-wise multiplication.

multinomial(…) : Return a tensor with index sampled from multinomial distribution.

narrow(…) : Return a new tensor that is a narrowed version of input tensor.

ne(…) : Compute the element-wise not-equal comparison.

neg(…) : Compute the element-wise negative.

nonzero(…) : Return the index of non-zero elements.

ones(…) : Return a tensor filled with ones.

ones_like(…) : Return a tensor of ones with shape as the other.

one_hot(…) : Return the one-hot representation for input.

permute(…) : Return a new tensor with the specific order of dimensions.

pow(…) : Compute the power of input.

rand(…) : Return a tensor from the uniform distribution of U(0, 1).

randn(…) : Return a tensor from the normal distribution of N(0, 1).

randperm(…) : Return a tensor with value in the permuted range.

reciprocal(…) : Compute the reciprocal of input.

reshape(…) : Change the shape of input.

roll(…) : Roll elements along the given dimension.

round(…) : Compute the nearest integer of input.

rsqrt(…) : Compute the reciprocal square root of input.

scatter(…) : Update elements along the given dimension of index.

scatter_add(…) : Add elements along the given dimension of index.

sign(…) : Compute the sign indication of input.

sin(…) : Compute the sin of input.

sort(…) : Return the sorted elements along the given dimension.

split(…) : Split input into chunks along the given dimension.

sqrt(…) : Compute the square root of input.

squeeze(…) : Remove the dimensions of input with size 1.

stack(…) : Stack the inputs along the given dimension.

sub(…) : Compute the element-wise subtraction.

sum(…) : Compute the sum value of elements along the given dimension.

tensor(…) : Create a tensor initializing from the given data.

tile(…) : Repeat elements along each dimension of input.

topk(…) : Return the top-K largest or smallest elements along the given dimension.

transpose(…) : Return a new tensor with two dimensions swapped.

tril(…) : Return the lower triangular part of input.

triu(…) : Return the upper triangular part of input.

unique(…) : Return the unique elements of input.

unsqueeze(…) : Expand the dimensions of input with size 1.

where(…) : Select the elements from two branches under the condition.

zeros(…) : Return a tensor filled with zeros.

zeros_like(…) : Return a tensor of zeros with shape as the other.