[][src]Struct tch::Tensor

pub struct Tensor { /* fields omitted */ }

A tensor object.

Methods

impl Tensor[src]

pub fn new() -> Tensor[src]

Creates a new tensor.

pub fn int_vec(v: &[i64]) -> Tensor[src]

Creates a one-dimension tensor using some integer values.

pub fn float_vec(v: &[f64]) -> Tensor[src]

Creates a one-dimension tensor using some float values.

pub fn size(&self) -> Vec<i64>[src]

Returns the shape of the input tensor.

pub fn kind(&self) -> Kind[src]

Returns the kind of elements stored in the input tensor.

pub fn device(&self) -> Device[src]

Returns the device on which the input tensor is located.

pub fn print(&self)[src]

Prints the input tensor.

Caution: this uses the C++ printer which prints the whole tensor even if it is very large.

pub fn double_value(&self, idx: &[i32]) -> f64[src]

pub fn int64_value(&self, idx: &[i32]) -> i64[src]

pub fn requires_grad(&self) -> bool[src]

pub fn defined(&self) -> bool[src]

pub fn zero_grad(&mut self)[src]

pub fn backward(&self)[src]

pub fn copy_data<T>(&self, dst: &mut [T], numel: i64)[src]

pub fn numel(&self) -> i64[src]

Returns the total number of elements stored in a tensor.

pub fn of_data(data: &[u8], kind: Kind) -> Tensor[src]

pub fn shallow_clone(&self) -> Tensor[src]

Returns a new tensor that share storage with the input tensor.

pub fn copy_(&self, src: &Tensor)[src]

Copies values from the argument tensor to the input tensor.

pub fn load(path: &Path) -> Fallible<Tensor>[src]

Loads a tensor from a file.

The file format is the same as the one used by the PyTorch C++ API.

pub fn save(&self, path: &Path) -> Fallible<()>[src]

Saves a tensor to a file.

The file format is the same as the one used by the PyTorch C++ API.

pub fn save_multi(
    named_tensors: &[(&str, &Tensor)],
    path: &Path
) -> Fallible<()>
[src]

Saves some named tensors to a file

The file format is the same as the one used by the PyTorch C++ API.

pub fn load_multi(path: &Path) -> Fallible<Vec<(String, Tensor)>>[src]

Loads some named tensors from a file

The file format is the same as the one used by the PyTorch C++ API.

impl Tensor[src]

pub fn abs(&self) -> Tensor[src]

pub fn abs_(&self) -> Tensor[src]

pub fn abs_out(&self, result: &Tensor) -> Tensor[src]

pub fn acos(&self) -> Tensor[src]

pub fn acos_(&self) -> Tensor[src]

pub fn acos_out(&self, result: &Tensor) -> Tensor[src]

pub fn adaptive_avg_pool1d(&self, output_size: &[i64]) -> Tensor[src]

pub fn adaptive_avg_pool2d(&self, output_size: &[i64]) -> Tensor[src]

pub fn adaptive_avg_pool2d_backward(&self, grad_output: &Tensor) -> Tensor[src]

pub fn adaptive_avg_pool2d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor
) -> Tensor
[src]

pub fn adaptive_avg_pool2d_out(
    &self,
    output: &Tensor,
    output_size: &[i64]
) -> Tensor
[src]

pub fn adaptive_avg_pool3d(&self, output_size: &[i64]) -> Tensor[src]

pub fn adaptive_avg_pool3d_backward(&self, grad_output: &Tensor) -> Tensor[src]

pub fn adaptive_avg_pool3d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor
) -> Tensor
[src]

pub fn adaptive_avg_pool3d_out(
    &self,
    output: &Tensor,
    output_size: &[i64]
) -> Tensor
[src]

pub fn adaptive_max_pool1d(&self, output_size: &[i64]) -> (Tensor, Tensor)[src]

pub fn adaptive_max_pool2d(&self, output_size: &[i64]) -> (Tensor, Tensor)[src]

pub fn adaptive_max_pool2d_backward(
    &self,
    grad_output: &Tensor,
    indices: &Tensor
) -> Tensor
[src]

pub fn adaptive_max_pool2d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    indices: &Tensor
) -> Tensor
[src]

pub fn adaptive_max_pool2d_out(
    &self,
    output: &Tensor,
    indices: &Tensor,
    output_size: &[i64]
) -> (Tensor, Tensor)
[src]

pub fn adaptive_max_pool3d(&self, output_size: &[i64]) -> (Tensor, Tensor)[src]

pub fn adaptive_max_pool3d_backward(
    &self,
    grad_output: &Tensor,
    indices: &Tensor
) -> Tensor
[src]

pub fn adaptive_max_pool3d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    indices: &Tensor
) -> Tensor
[src]

pub fn adaptive_max_pool3d_out(
    &self,
    output: &Tensor,
    indices: &Tensor,
    output_size: &[i64]
) -> (Tensor, Tensor)
[src]

pub fn g_add(&self, other: &Tensor) -> Tensor[src]

pub fn g_add1(&self, other: &Scalar) -> Tensor[src]

pub fn g_add_(&self, other: &Tensor) -> Tensor[src]

pub fn g_add_1(&self, other: &Scalar) -> Tensor[src]

pub fn add_out(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn addbmm(&self, batch1: &Tensor, batch2: &Tensor) -> Tensor[src]

pub fn addbmm_(&self, batch1: &Tensor, batch2: &Tensor) -> Tensor[src]

pub fn addbmm_out(
    &self,
    result: &Tensor,
    batch1: &Tensor,
    batch2: &Tensor
) -> Tensor
[src]

pub fn addcdiv(&self, tensor1: &Tensor, tensor2: &Tensor) -> Tensor[src]

pub fn addcdiv_(&self, tensor1: &Tensor, tensor2: &Tensor) -> Tensor[src]

pub fn addcdiv_out(
    &self,
    result: &Tensor,
    tensor1: &Tensor,
    tensor2: &Tensor
) -> Tensor
[src]

pub fn addcmul(&self, tensor1: &Tensor, tensor2: &Tensor) -> Tensor[src]

pub fn addcmul_(&self, tensor1: &Tensor, tensor2: &Tensor) -> Tensor[src]

pub fn addcmul_out(
    &self,
    result: &Tensor,
    tensor1: &Tensor,
    tensor2: &Tensor
) -> Tensor
[src]

pub fn addmm(&self, mat1: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn addmm_(&self, mat1: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn addmm_out(&self, result: &Tensor, mat1: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn addmv(&self, mat: &Tensor, vec: &Tensor) -> Tensor[src]

pub fn addmv_(&self, mat: &Tensor, vec: &Tensor) -> Tensor[src]

pub fn addmv_out(&self, result: &Tensor, mat: &Tensor, vec: &Tensor) -> Tensor[src]

pub fn addr(&self, vec1: &Tensor, vec2: &Tensor) -> Tensor[src]

pub fn addr_(&self, vec1: &Tensor, vec2: &Tensor) -> Tensor[src]

pub fn addr_out(&self, result: &Tensor, vec1: &Tensor, vec2: &Tensor) -> Tensor[src]

pub fn alias(&self) -> Tensor[src]

pub fn all(&self) -> Tensor[src]

pub fn all1(&self, dim: i64, keepdim: bool) -> Tensor[src]

pub fn all_out(&self, result: &Tensor, dim: i64, keepdim: bool) -> Tensor[src]

pub fn alpha_dropout(&self, p: f64, train: bool) -> Tensor[src]

pub fn alpha_dropout_(&self, p: f64, train: bool) -> Tensor[src]

pub fn any(&self) -> Tensor[src]

pub fn any1(&self, dim: i64, keepdim: bool) -> Tensor[src]

pub fn any_out(&self, result: &Tensor, dim: i64, keepdim: bool) -> Tensor[src]

pub fn arange(end_: &Scalar, options: (Kind, Device)) -> Tensor[src]

pub fn arange1(start: &Scalar, end_: &Scalar, options: (Kind, Device)) -> Tensor[src]

pub fn arange2(
    start: &Scalar,
    end_: &Scalar,
    step: &Scalar,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn arange_out(result: &Tensor, end_: &Scalar) -> Tensor[src]

pub fn arange_out1(result: &Tensor, start: &Scalar, end_: &Scalar) -> Tensor[src]

pub fn arange_out2(
    result: &Tensor,
    start: &Scalar,
    end_: &Scalar,
    step: &Scalar
) -> Tensor
[src]

pub fn argmax(&self) -> Tensor[src]

pub fn argmax1(&self, dim: i64, keepdim: bool) -> Tensor[src]

pub fn argmin(&self) -> Tensor[src]

pub fn argmin1(&self, dim: i64, keepdim: bool) -> Tensor[src]

pub fn as_strided(&self, size: &[i64], stride: &[i64]) -> Tensor[src]

pub fn as_strided1(
    &self,
    size: &[i64],
    stride: &[i64],
    storage_offset: i64
) -> Tensor
[src]

pub fn as_strided_(&self, size: &[i64], stride: &[i64]) -> Tensor[src]

pub fn as_strided_1(
    &self,
    size: &[i64],
    stride: &[i64],
    storage_offset: i64
) -> Tensor
[src]

pub fn asin(&self) -> Tensor[src]

pub fn asin_(&self) -> Tensor[src]

pub fn asin_out(&self, result: &Tensor) -> Tensor[src]

pub fn atan(&self) -> Tensor[src]

pub fn atan2(&self, other: &Tensor) -> Tensor[src]

pub fn atan2_(&self, other: &Tensor) -> Tensor[src]

pub fn atan2_out(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn atan_(&self) -> Tensor[src]

pub fn atan_out(&self, result: &Tensor) -> Tensor[src]

pub fn avg_pool1d(
    &self,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    ceil_mode: bool,
    count_include_pad: bool
) -> Tensor
[src]

pub fn avg_pool2d(
    &self,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    ceil_mode: bool,
    count_include_pad: bool
) -> Tensor
[src]

pub fn avg_pool2d_backward(
    &self,
    grad_output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    ceil_mode: bool,
    count_include_pad: bool
) -> Tensor
[src]

pub fn avg_pool2d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    ceil_mode: bool,
    count_include_pad: bool
) -> Tensor
[src]

pub fn avg_pool2d_out(
    &self,
    output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    ceil_mode: bool,
    count_include_pad: bool
) -> Tensor
[src]

pub fn avg_pool3d(
    &self,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    ceil_mode: bool,
    count_include_pad: bool
) -> Tensor
[src]

pub fn avg_pool3d_backward(
    &self,
    grad_output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    ceil_mode: bool,
    count_include_pad: bool
) -> Tensor
[src]

pub fn avg_pool3d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    ceil_mode: bool,
    count_include_pad: bool
) -> Tensor
[src]

pub fn avg_pool3d_out(
    &self,
    output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    ceil_mode: bool,
    count_include_pad: bool
) -> Tensor
[src]

pub fn baddbmm(&self, batch1: &Tensor, batch2: &Tensor) -> Tensor[src]

pub fn baddbmm_(&self, batch1: &Tensor, batch2: &Tensor) -> Tensor[src]

pub fn baddbmm_out(
    &self,
    result: &Tensor,
    batch1: &Tensor,
    batch2: &Tensor
) -> Tensor
[src]

pub fn bartlett_window(window_length: i64, options: (Kind, Device)) -> Tensor[src]

pub fn bartlett_window1(
    window_length: i64,
    periodic: bool,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn batch_norm(
    &self,
    weight: Option<&Tensor>,
    bias: Option<&Tensor>,
    running_mean: Option<&Tensor>,
    running_var: Option<&Tensor>,
    training: bool,
    momentum: f64,
    eps: f64,
    cudnn_enabled: bool
) -> Tensor
[src]

pub fn bernoulli(&self) -> Tensor[src]

pub fn bernoulli1(&self, p: f64) -> Tensor[src]

pub fn bernoulli_(&self, p: &Tensor) -> Tensor[src]

pub fn bernoulli_1(&self, p: f64) -> Tensor[src]

pub fn bernoulli_out(&self, result: &Tensor) -> Tensor[src]

pub fn bilinear(
    input1: &Tensor,
    input2: &Tensor,
    weight: &Tensor,
    bias: Option<&Tensor>
) -> Tensor
[src]

pub fn binary_cross_entropy(
    &self,
    target: &Tensor,
    weight: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn binary_cross_entropy_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    weight: Option<&Tensor>,
    reduction: i64
) -> Tensor
[src]

pub fn binary_cross_entropy_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    target: &Tensor,
    weight: Option<&Tensor>,
    reduction: i64
) -> Tensor
[src]

pub fn binary_cross_entropy_out(
    &self,
    output: &Tensor,
    target: &Tensor,
    weight: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn binary_cross_entropy_with_logits(
    &self,
    target: &Tensor,
    weight: Option<&Tensor>,
    pos_weight: Option<&Tensor>,
    reduction: i64
) -> Tensor
[src]

pub fn binary_cross_entropy_with_logits_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    weight: Option<&Tensor>,
    pos_weight: Option<&Tensor>,
    reduction: i64
) -> Tensor
[src]

pub fn bincount(&self, weights: Option<&Tensor>, minlength: i64) -> Tensor[src]

pub fn blackman_window(window_length: i64, options: (Kind, Device)) -> Tensor[src]

pub fn blackman_window1(
    window_length: i64,
    periodic: bool,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn bmm(&self, mat2: &Tensor) -> Tensor[src]

pub fn bmm_out(&self, result: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn btrifact(&self, pivot: bool) -> (Tensor, Tensor)[src]

pub fn btrifact_out(
    &self,
    a_lu: &Tensor,
    pivots: &Tensor,
    pivot: bool
) -> (Tensor, Tensor)
[src]

pub fn btrifact_with_info(&self, pivot: bool) -> (Tensor, Tensor, Tensor)[src]

pub fn btrifact_with_info_out(
    &self,
    a_lu: &Tensor,
    pivots: &Tensor,
    info: &Tensor,
    pivot: bool
) -> (Tensor, Tensor, Tensor)
[src]

pub fn btrisolve(&self, lu_data: &Tensor, lu_pivots: &Tensor) -> Tensor[src]

pub fn btrisolve_out(
    &self,
    result: &Tensor,
    lu_data: &Tensor,
    lu_pivots: &Tensor
) -> Tensor
[src]

pub fn cat(tensors: &[&Tensor], dim: i64) -> Tensor[src]

pub fn cat_out(result: &Tensor, tensors: &[&Tensor], dim: i64) -> Tensor[src]

pub fn cauchy_(&self, median: f64, sigma: f64) -> Tensor[src]

pub fn ceil(&self) -> Tensor[src]

pub fn ceil_(&self) -> Tensor[src]

pub fn ceil_out(&self, result: &Tensor) -> Tensor[src]

pub fn celu(&self) -> Tensor[src]

pub fn celu_(&self) -> Tensor[src]

pub fn chain_matmul(matrices: &[&Tensor]) -> Tensor[src]

pub fn cholesky(&self, upper: bool) -> Tensor[src]

pub fn cholesky_out(&self, result: &Tensor, upper: bool) -> Tensor[src]

pub fn clamp(&self, min: &Scalar, max: &Scalar) -> Tensor[src]

pub fn clamp_(&self, min: &Scalar, max: &Scalar) -> Tensor[src]

pub fn clamp_max(&self, max: &Scalar) -> Tensor[src]

pub fn clamp_max_(&self, max: &Scalar) -> Tensor[src]

pub fn clamp_max_out(&self, result: &Tensor, max: &Scalar) -> Tensor[src]

pub fn clamp_min(&self, min: &Scalar) -> Tensor[src]

pub fn clamp_min_(&self, min: &Scalar) -> Tensor[src]

pub fn clamp_min_out(&self, result: &Tensor, min: &Scalar) -> Tensor[src]

pub fn clamp_out(&self, result: &Tensor, min: &Scalar, max: &Scalar) -> Tensor[src]

pub fn clone(&self) -> Tensor[src]

pub fn coalesce(&self) -> Tensor[src]

pub fn constant_pad_nd(&self, pad: &[i64]) -> Tensor[src]

pub fn contiguous(&self) -> Tensor[src]

pub fn conv1d(
    &self,
    weight: &Tensor,
    bias: &Tensor,
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    groups: i64
) -> Tensor
[src]

pub fn conv2d(
    &self,
    weight: &Tensor,
    bias: &Tensor,
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    groups: i64
) -> Tensor
[src]

pub fn conv3d(
    &self,
    weight: &Tensor,
    bias: &Tensor,
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    groups: i64
) -> Tensor
[src]

pub fn conv_tbc(&self, weight: &Tensor, bias: &Tensor, pad: i64) -> Tensor[src]

pub fn conv_tbc_backward(
    &self,
    input: &Tensor,
    weight: &Tensor,
    bias: &Tensor,
    pad: i64
) -> (Tensor, Tensor, Tensor)
[src]

pub fn conv_transpose1d(
    &self,
    weight: &Tensor,
    bias: &Tensor,
    stride: &[i64],
    padding: &[i64],
    output_padding: &[i64],
    groups: i64,
    dilation: &[i64]
) -> Tensor
[src]

pub fn conv_transpose2d(
    &self,
    weight: &Tensor,
    bias: &Tensor,
    stride: &[i64],
    padding: &[i64],
    output_padding: &[i64],
    groups: i64,
    dilation: &[i64]
) -> Tensor
[src]

pub fn conv_transpose3d(
    &self,
    weight: &Tensor,
    bias: &Tensor,
    stride: &[i64],
    padding: &[i64],
    output_padding: &[i64],
    groups: i64,
    dilation: &[i64]
) -> Tensor
[src]

pub fn convolution(
    &self,
    weight: &Tensor,
    bias: Option<&Tensor>,
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    transposed: bool,
    output_padding: &[i64],
    groups: i64
) -> Tensor
[src]

pub fn copy_sparse_to_sparse_(&self, src: &Tensor, non_blocking: bool) -> Tensor[src]

pub fn cos(&self) -> Tensor[src]

pub fn cos_(&self) -> Tensor[src]

pub fn cos_out(&self, result: &Tensor) -> Tensor[src]

pub fn cosh(&self) -> Tensor[src]

pub fn cosh_(&self) -> Tensor[src]

pub fn cosh_out(&self, result: &Tensor) -> Tensor[src]

pub fn cosine_embedding_loss(
    input1: &Tensor,
    input2: &Tensor,
    target: &Tensor,
    margin: f64,
    reduction: i64
) -> Tensor
[src]

pub fn cross(&self, other: &Tensor, dim: i64) -> Tensor[src]

pub fn cross_out(&self, result: &Tensor, other: &Tensor, dim: i64) -> Tensor[src]

pub fn ctc_loss(
    log_probs: &Tensor,
    targets: &Tensor,
    input_lengths: &[i64],
    target_lengths: &[i64],
    blank: i64,
    reduction: i64
) -> Tensor
[src]

pub fn ctc_loss1(
    log_probs: &Tensor,
    targets: &Tensor,
    input_lengths: &Tensor,
    target_lengths: &Tensor,
    blank: i64,
    reduction: i64
) -> Tensor
[src]

pub fn cudnn_affine_grid_generator(
    theta: &Tensor,
    n: i64,
    c: i64,
    h: i64,
    w: i64
) -> Tensor
[src]

pub fn cudnn_affine_grid_generator_backward(
    grad: &Tensor,
    n: i64,
    c: i64,
    h: i64,
    w: i64
) -> Tensor
[src]

pub fn cudnn_batch_norm(
    &self,
    weight: &Tensor,
    bias: Option<&Tensor>,
    running_mean: Option<&Tensor>,
    running_var: Option<&Tensor>,
    training: bool,
    exponential_average_factor: f64,
    epsilon: f64
) -> (Tensor, Tensor, Tensor)
[src]

pub fn cudnn_batch_norm_backward(
    &self,
    grad_output: &Tensor,
    weight: &Tensor,
    running_mean: Option<&Tensor>,
    running_var: Option<&Tensor>,
    save_mean: Option<&Tensor>,
    save_var: Option<&Tensor>,
    epsilon: f64
) -> (Tensor, Tensor, Tensor)
[src]

pub fn cudnn_convolution(
    &self,
    weight: &Tensor,
    bias: Option<&Tensor>,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn cudnn_convolution_backward_bias(grad_output: &Tensor) -> Tensor[src]

pub fn cudnn_convolution_backward_input(
    self_size: &[i64],
    grad_output: &Tensor,
    weight: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn cudnn_convolution_backward_weight(
    &self,
    weight_size: &[i64],
    grad_output: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn cudnn_convolution_transpose(
    &self,
    weight: &Tensor,
    bias: Option<&Tensor>,
    padding: &[i64],
    output_padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn cudnn_convolution_transpose_backward_bias(grad_output: &Tensor) -> Tensor[src]

pub fn cudnn_convolution_transpose_backward_input(
    grad_output: &Tensor,
    weight: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn cudnn_convolution_transpose_backward_weight(
    &self,
    weight_size: &[i64],
    grad_output: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn cudnn_grid_sampler(&self, grid: &Tensor) -> Tensor[src]

pub fn cudnn_grid_sampler_backward(
    &self,
    grid: &Tensor,
    grad_output: &Tensor
) -> (Tensor, Tensor)
[src]

pub fn cumprod(&self, dim: i64) -> Tensor[src]

pub fn cumprod1(&self, dim: i64, dtype: Kind) -> Tensor[src]

pub fn cumprod_out(&self, result: &Tensor, dim: i64) -> Tensor[src]

pub fn cumprod_out1(&self, result: &Tensor, dim: i64, dtype: Kind) -> Tensor[src]

pub fn cumsum(&self, dim: i64) -> Tensor[src]

pub fn cumsum1(&self, dim: i64, dtype: Kind) -> Tensor[src]

pub fn cumsum_out(&self, result: &Tensor, dim: i64) -> Tensor[src]

pub fn cumsum_out1(&self, result: &Tensor, dim: i64, dtype: Kind) -> Tensor[src]

pub fn det(&self) -> Tensor[src]

pub fn detach(&self) -> Tensor[src]

pub fn detach_(&self) -> Tensor[src]

pub fn diag(&self, diagonal: i64) -> Tensor[src]

pub fn diag_embed(&self, offset: i64, dim1: i64, dim2: i64) -> Tensor[src]

pub fn diag_out(&self, result: &Tensor, diagonal: i64) -> Tensor[src]

pub fn diagflat(&self, offset: i64) -> Tensor[src]

pub fn diagonal(&self, offset: i64, dim1: i64, dim2: i64) -> Tensor[src]

pub fn digamma(&self) -> Tensor[src]

pub fn digamma_(&self) -> Tensor[src]

pub fn digamma_out(&self, result: &Tensor) -> Tensor[src]

pub fn dist(&self, other: &Tensor) -> Tensor[src]

pub fn g_div(&self, other: &Tensor) -> Tensor[src]

pub fn g_div1(&self, other: &Scalar) -> Tensor[src]

pub fn g_div_(&self, other: &Tensor) -> Tensor[src]

pub fn g_div_1(&self, other: &Scalar) -> Tensor[src]

pub fn div_out(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn dot(&self, tensor: &Tensor) -> Tensor[src]

pub fn dot_out(&self, result: &Tensor, tensor: &Tensor) -> Tensor[src]

pub fn dropout(&self, p: f64, train: bool) -> Tensor[src]

pub fn dropout_(&self, p: f64, train: bool) -> Tensor[src]

pub fn eig(&self, eigenvectors: bool) -> (Tensor, Tensor)[src]

pub fn eig_out(
    &self,
    e: &Tensor,
    v: &Tensor,
    eigenvectors: bool
) -> (Tensor, Tensor)
[src]

pub fn elu(&self) -> Tensor[src]

pub fn elu_(&self) -> Tensor[src]

pub fn elu_out(&self, output: &Tensor) -> Tensor[src]

pub fn embedding(
    weight: &Tensor,
    indices: &Tensor,
    padding_idx: i64,
    scale_grad_by_freq: bool,
    sparse: bool
) -> Tensor
[src]

pub fn embedding_backward(
    grad: &Tensor,
    indices: &Tensor,
    num_weights: i64,
    padding_idx: i64,
    scale_grad_by_freq: bool,
    sparse: bool
) -> Tensor
[src]

pub fn embedding_bag(
    weight: &Tensor,
    indices: &Tensor,
    offsets: &Tensor,
    scale_grad_by_freq: bool,
    mode: i64,
    sparse: bool
) -> (Tensor, Tensor, Tensor, Tensor)
[src]

pub fn embedding_dense_backward(
    grad: &Tensor,
    indices: &Tensor,
    num_weights: i64,
    padding_idx: i64,
    scale_grad_by_freq: bool
) -> Tensor
[src]

pub fn embedding_renorm_(
    &self,
    indices: &Tensor,
    max_norm: f64,
    norm_type: f64
) -> Tensor
[src]

pub fn embedding_sparse_backward(
    grad: &Tensor,
    indices: &Tensor,
    num_weights: i64,
    padding_idx: i64,
    scale_grad_by_freq: bool
) -> Tensor
[src]

pub fn empty(size: &[i64], options: (Kind, Device)) -> Tensor[src]

pub fn empty_like(&self) -> Tensor[src]

pub fn empty_like1(&self, options: (Kind, Device)) -> Tensor[src]

pub fn empty_out(result: &Tensor, size: &[i64]) -> Tensor[src]

pub fn empty_strided(
    size: &[i64],
    stride: &[i64],
    options: (Kind, Device)
) -> Tensor
[src]

pub fn eq(&self, other: &Scalar) -> Tensor[src]

pub fn eq1(&self, other: &Tensor) -> Tensor[src]

pub fn eq_(&self, other: &Scalar) -> Tensor[src]

pub fn eq_1(&self, other: &Tensor) -> Tensor[src]

pub fn eq_out(&self, result: &Tensor, other: &Scalar) -> Tensor[src]

pub fn eq_out1(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn erf(&self) -> Tensor[src]

pub fn erf_(&self) -> Tensor[src]

pub fn erf_out(&self, result: &Tensor) -> Tensor[src]

pub fn erfc(&self) -> Tensor[src]

pub fn erfc_(&self) -> Tensor[src]

pub fn erfc_out(&self, result: &Tensor) -> Tensor[src]

pub fn erfinv(&self) -> Tensor[src]

pub fn erfinv_(&self) -> Tensor[src]

pub fn erfinv_out(&self, result: &Tensor) -> Tensor[src]

pub fn exp(&self) -> Tensor[src]

pub fn exp_(&self) -> Tensor[src]

pub fn exp_out(&self, result: &Tensor) -> Tensor[src]

pub fn expand(&self, size: &[i64], implicit: bool) -> Tensor[src]

pub fn expand_as(&self, other: &Tensor) -> Tensor[src]

pub fn expm1(&self) -> Tensor[src]

pub fn expm1_(&self) -> Tensor[src]

pub fn expm1_out(&self, result: &Tensor) -> Tensor[src]

pub fn exponential_(&self, lambd: f64) -> Tensor[src]

pub fn eye(n: i64, options: (Kind, Device)) -> Tensor[src]

pub fn eye1(n: i64, m: i64, options: (Kind, Device)) -> Tensor[src]

pub fn eye_out(result: &Tensor, n: i64) -> Tensor[src]

pub fn eye_out1(result: &Tensor, n: i64, m: i64) -> Tensor[src]

pub fn feature_alpha_dropout(&self, p: f64, train: bool) -> Tensor[src]

pub fn feature_alpha_dropout_(&self, p: f64, train: bool) -> Tensor[src]

pub fn feature_dropout(&self, p: f64, train: bool) -> Tensor[src]

pub fn feature_dropout_(&self, p: f64, train: bool) -> Tensor[src]

pub fn fft(&self, signal_ndim: i64, normalized: bool) -> Tensor[src]

pub fn fill_(&self, value: &Scalar) -> Tensor[src]

pub fn fill_1(&self, value: &Tensor) -> Tensor[src]

pub fn flatten(&self, start_dim: i64, end_dim: i64) -> Tensor[src]

pub fn flip(&self, dims: &[i64]) -> Tensor[src]

pub fn floor(&self) -> Tensor[src]

pub fn floor_(&self) -> Tensor[src]

pub fn floor_out(&self, result: &Tensor) -> Tensor[src]

pub fn fmod(&self, other: &Scalar) -> Tensor[src]

pub fn fmod1(&self, other: &Tensor) -> Tensor[src]

pub fn fmod_(&self, other: &Scalar) -> Tensor[src]

pub fn fmod_1(&self, other: &Tensor) -> Tensor[src]

pub fn fmod_out(&self, result: &Tensor, other: &Scalar) -> Tensor[src]

pub fn fmod_out1(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn frac(&self) -> Tensor[src]

pub fn frac_(&self) -> Tensor[src]

pub fn frac_out(&self, result: &Tensor) -> Tensor[src]

pub fn fractional_max_pool2d(
    &self,
    kernel_size: &[i64],
    output_size: &[i64],
    random_samples: &Tensor
) -> (Tensor, Tensor)
[src]

pub fn fractional_max_pool2d_backward(
    &self,
    grad_output: &Tensor,
    kernel_size: &[i64],
    output_size: &[i64],
    indices: &Tensor
) -> Tensor
[src]

pub fn fractional_max_pool2d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    kernel_size: &[i64],
    output_size: &[i64],
    indices: &Tensor
) -> Tensor
[src]

pub fn fractional_max_pool2d_out(
    &self,
    output: &Tensor,
    indices: &Tensor,
    kernel_size: &[i64],
    output_size: &[i64],
    random_samples: &Tensor
) -> (Tensor, Tensor)
[src]

pub fn frobenius_norm(&self) -> Tensor[src]

pub fn frobenius_norm1(&self, dim: &[i64], keepdim: bool) -> Tensor[src]

pub fn frobenius_norm_out(
    &self,
    result: &Tensor,
    dim: &[i64],
    keepdim: bool
) -> Tensor
[src]

pub fn full(
    size: &[i64],
    fill_value: &Scalar,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn full_like(&self, fill_value: &Scalar) -> Tensor[src]

pub fn full_like1(&self, fill_value: &Scalar, options: (Kind, Device)) -> Tensor[src]

pub fn full_out(result: &Tensor, size: &[i64], fill_value: &Scalar) -> Tensor[src]

pub fn gather(&self, dim: i64, index: &Tensor) -> Tensor[src]

pub fn gather_out(&self, result: &Tensor, dim: i64, index: &Tensor) -> Tensor[src]

pub fn ge(&self, other: &Scalar) -> Tensor[src]

pub fn ge1(&self, other: &Tensor) -> Tensor[src]

pub fn ge_(&self, other: &Scalar) -> Tensor[src]

pub fn ge_1(&self, other: &Tensor) -> Tensor[src]

pub fn ge_out(&self, result: &Tensor, other: &Scalar) -> Tensor[src]

pub fn ge_out1(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn gels(&self, a: &Tensor) -> (Tensor, Tensor)[src]

pub fn gels_out(&self, x: &Tensor, qr: &Tensor, a: &Tensor) -> (Tensor, Tensor)[src]

pub fn geometric_(&self, p: f64) -> Tensor[src]

pub fn geqrf(&self) -> (Tensor, Tensor)[src]

pub fn geqrf_out(&self, result0: &Tensor, result1: &Tensor) -> (Tensor, Tensor)[src]

pub fn ger(&self, vec2: &Tensor) -> Tensor[src]

pub fn ger_out(&self, result: &Tensor, vec2: &Tensor) -> Tensor[src]

pub fn gesv(&self, a: &Tensor) -> (Tensor, Tensor)[src]

pub fn gesv_out(
    &self,
    solution: &Tensor,
    lu: &Tensor,
    a: &Tensor
) -> (Tensor, Tensor)
[src]

pub fn glu(&self, dim: i64) -> Tensor[src]

pub fn glu_backward(&self, grad_output: &Tensor, dim: i64) -> Tensor[src]

pub fn glu_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    dim: i64
) -> Tensor
[src]

pub fn glu_out(&self, output: &Tensor, dim: i64) -> Tensor[src]

pub fn grad(&self) -> Tensor[src]

pub fn grid_sampler(
    &self,
    grid: &Tensor,
    interpolation_mode: i64,
    padding_mode: i64
) -> Tensor
[src]

pub fn grid_sampler_2d(
    &self,
    grid: &Tensor,
    interpolation_mode: i64,
    padding_mode: i64
) -> Tensor
[src]

pub fn grid_sampler_2d_backward(
    &self,
    grad_output: &Tensor,
    grid: &Tensor,
    interpolation_mode: i64,
    padding_mode: i64
) -> (Tensor, Tensor)
[src]

pub fn grid_sampler_3d(
    &self,
    grid: &Tensor,
    interpolation_mode: i64,
    padding_mode: i64
) -> Tensor
[src]

pub fn grid_sampler_3d_backward(
    &self,
    grad_output: &Tensor,
    grid: &Tensor,
    interpolation_mode: i64,
    padding_mode: i64
) -> (Tensor, Tensor)
[src]

pub fn group_norm(
    &self,
    num_groups: i64,
    weight: Option<&Tensor>,
    bias: Option<&Tensor>,
    eps: f64,
    cudnn_enabled: bool
) -> Tensor
[src]

pub fn gru(
    &self,
    hx: &Tensor,
    params: &[&Tensor],
    has_biases: bool,
    num_layers: i64,
    dropout: f64,
    train: bool,
    bidirectional: bool,
    batch_first: bool
) -> (Tensor, Tensor)
[src]

pub fn gru1(
    data: &Tensor,
    batch_sizes: &Tensor,
    hx: &Tensor,
    params: &[&Tensor],
    has_biases: bool,
    num_layers: i64,
    dropout: f64,
    train: bool,
    bidirectional: bool
) -> (Tensor, Tensor)
[src]

pub fn gru_cell(
    &self,
    hx: &Tensor,
    w_ih: &Tensor,
    w_hh: &Tensor,
    b_ih: Option<&Tensor>,
    b_hh: Option<&Tensor>
) -> Tensor
[src]

pub fn gt(&self, other: &Scalar) -> Tensor[src]

pub fn gt1(&self, other: &Tensor) -> Tensor[src]

pub fn gt_(&self, other: &Scalar) -> Tensor[src]

pub fn gt_1(&self, other: &Tensor) -> Tensor[src]

pub fn gt_out(&self, result: &Tensor, other: &Scalar) -> Tensor[src]

pub fn gt_out1(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn hamming_window(window_length: i64, options: (Kind, Device)) -> Tensor[src]

pub fn hamming_window1(
    window_length: i64,
    periodic: bool,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn hamming_window2(
    window_length: i64,
    periodic: bool,
    alpha: f64,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn hamming_window3(
    window_length: i64,
    periodic: bool,
    alpha: f64,
    beta: f64,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn hann_window(window_length: i64, options: (Kind, Device)) -> Tensor[src]

pub fn hann_window1(
    window_length: i64,
    periodic: bool,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn hardshrink(&self) -> Tensor[src]

pub fn hardshrink_backward(&self, grad_out: &Tensor, lambd: &Scalar) -> Tensor[src]

pub fn hardtanh(&self) -> Tensor[src]

pub fn hardtanh_(&self) -> Tensor[src]

pub fn hardtanh_out(&self, output: &Tensor) -> Tensor[src]

pub fn hinge_embedding_loss(
    &self,
    target: &Tensor,
    margin: f64,
    reduction: i64
) -> Tensor
[src]

pub fn histc(&self, bins: i64) -> Tensor[src]

pub fn histc_out(&self, result: &Tensor, bins: i64) -> Tensor[src]

pub fn hspmm(mat1: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn hspmm_out(result: &Tensor, mat1: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn ifft(&self, signal_ndim: i64, normalized: bool) -> Tensor[src]

pub fn index(&self, indices: &[&Tensor]) -> Tensor[src]

pub fn index_add_(&self, dim: i64, index: &Tensor, source: &Tensor) -> Tensor[src]

pub fn index_copy_(&self, dim: i64, index: &Tensor, source: &Tensor) -> Tensor[src]

pub fn index_fill_(&self, dim: i64, index: &Tensor, value: &Scalar) -> Tensor[src]

pub fn index_fill_1(&self, dim: i64, index: &Tensor, value: &Tensor) -> Tensor[src]

pub fn index_put(&self, indices: &[&Tensor], values: &Tensor) -> Tensor[src]

pub fn index_put_(&self, indices: &[&Tensor], values: &Tensor) -> Tensor[src]

pub fn index_select(&self, dim: i64, index: &Tensor) -> Tensor[src]

pub fn index_select_out(
    &self,
    result: &Tensor,
    dim: i64,
    index: &Tensor
) -> Tensor
[src]

pub fn indices(&self) -> Tensor[src]

pub fn instance_norm(
    &self,
    weight: Option<&Tensor>,
    bias: Option<&Tensor>,
    running_mean: Option<&Tensor>,
    running_var: Option<&Tensor>,
    use_input_stats: bool,
    momentum: f64,
    eps: f64,
    cudnn_enabled: bool
) -> Tensor
[src]

pub fn inverse(&self) -> Tensor[src]

pub fn inverse_out(&self, result: &Tensor) -> Tensor[src]

pub fn irfft(
    &self,
    signal_ndim: i64,
    normalized: bool,
    onesided: bool,
    signal_sizes: &[i64]
) -> Tensor
[src]

pub fn isclose(
    &self,
    other: &Tensor,
    rtol: f64,
    atol: f64,
    equal_nan: bool
) -> Tensor
[src]

pub fn kl_div(&self, target: &Tensor, reduction: i64) -> Tensor[src]

pub fn kl_div_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn kthvalue(&self, k: i64, dim: i64, keepdim: bool) -> (Tensor, Tensor)[src]

pub fn kthvalue_out(
    &self,
    values: &Tensor,
    indices: &Tensor,
    k: i64,
    dim: i64,
    keepdim: bool
) -> (Tensor, Tensor)
[src]

pub fn l1_loss(&self, target: &Tensor, reduction: i64) -> Tensor[src]

pub fn l1_loss_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn l1_loss_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn l1_loss_out(
    &self,
    output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn layer_norm(
    &self,
    normalized_shape: &[i64],
    weight: Option<&Tensor>,
    bias: Option<&Tensor>,
    eps: f64,
    cudnn_enable: bool
) -> Tensor
[src]

pub fn le(&self, other: &Scalar) -> Tensor[src]

pub fn le1(&self, other: &Tensor) -> Tensor[src]

pub fn le_(&self, other: &Scalar) -> Tensor[src]

pub fn le_1(&self, other: &Tensor) -> Tensor[src]

pub fn le_out(&self, result: &Tensor, other: &Scalar) -> Tensor[src]

pub fn le_out1(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn leaky_relu(&self) -> Tensor[src]

pub fn leaky_relu_(&self) -> Tensor[src]

pub fn leaky_relu_out(&self, output: &Tensor) -> Tensor[src]

pub fn lerp(&self, end_: &Tensor, weight: &Scalar) -> Tensor[src]

pub fn lerp_(&self, end_: &Tensor, weight: &Scalar) -> Tensor[src]

pub fn lerp_out(
    &self,
    result: &Tensor,
    end_: &Tensor,
    weight: &Scalar
) -> Tensor
[src]

pub fn lgamma(&self) -> Tensor[src]

pub fn lgamma_(&self) -> Tensor[src]

pub fn lgamma_out(&self, result: &Tensor) -> Tensor[src]

pub fn linear(&self, weight: &Tensor, bias: &Tensor) -> Tensor[src]

pub fn linspace(
    start: &Scalar,
    end_: &Scalar,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn linspace1(
    start: &Scalar,
    end_: &Scalar,
    steps: i64,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn linspace_out(result: &Tensor, start: &Scalar, end_: &Scalar) -> Tensor[src]

pub fn linspace_out1(
    result: &Tensor,
    start: &Scalar,
    end_: &Scalar,
    steps: i64
) -> Tensor
[src]

pub fn log(&self) -> Tensor[src]

pub fn log10(&self) -> Tensor[src]

pub fn log10_(&self) -> Tensor[src]

pub fn log10_out(&self, result: &Tensor) -> Tensor[src]

pub fn log1p(&self) -> Tensor[src]

pub fn log1p_(&self) -> Tensor[src]

pub fn log1p_out(&self, result: &Tensor) -> Tensor[src]

pub fn log2(&self) -> Tensor[src]

pub fn log2_(&self) -> Tensor[src]

pub fn log2_out(&self, result: &Tensor) -> Tensor[src]

pub fn log_(&self) -> Tensor[src]

pub fn log_normal_(&self, mean: f64, std: f64) -> Tensor[src]

pub fn log_out(&self, result: &Tensor) -> Tensor[src]

pub fn log_sigmoid(&self) -> Tensor[src]

pub fn log_sigmoid_backward(
    &self,
    grad_output: &Tensor,
    buffer: &Tensor
) -> Tensor
[src]

pub fn log_sigmoid_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    buffer: &Tensor
) -> Tensor
[src]

pub fn log_sigmoid_out(&self, output: &Tensor) -> Tensor[src]

pub fn log_softmax(&self, dim: i64) -> Tensor[src]

pub fn log_softmax1(&self, dim: i64, dtype: Kind) -> Tensor[src]

pub fn logdet(&self) -> Tensor[src]

pub fn logspace(
    start: &Scalar,
    end_: &Scalar,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn logspace1(
    start: &Scalar,
    end_: &Scalar,
    steps: i64,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn logspace_out(result: &Tensor, start: &Scalar, end_: &Scalar) -> Tensor[src]

pub fn logspace_out1(
    result: &Tensor,
    start: &Scalar,
    end_: &Scalar,
    steps: i64
) -> Tensor
[src]

pub fn logsumexp(&self, dim: i64, keepdim: bool) -> Tensor[src]

pub fn logsumexp_out(&self, result: &Tensor, dim: i64, keepdim: bool) -> Tensor[src]

pub fn lstm(
    &self,
    hx: &[&Tensor],
    params: &[&Tensor],
    has_biases: bool,
    num_layers: i64,
    dropout: f64,
    train: bool,
    bidirectional: bool,
    batch_first: bool
) -> (Tensor, Tensor, Tensor)
[src]

pub fn lstm1(
    data: &Tensor,
    batch_sizes: &Tensor,
    hx: &[&Tensor],
    params: &[&Tensor],
    has_biases: bool,
    num_layers: i64,
    dropout: f64,
    train: bool,
    bidirectional: bool
) -> (Tensor, Tensor, Tensor)
[src]

pub fn lstm_cell(
    &self,
    hx: &[&Tensor],
    w_ih: &Tensor,
    w_hh: &Tensor,
    b_ih: Option<&Tensor>,
    b_hh: Option<&Tensor>
) -> (Tensor, Tensor)
[src]

pub fn lt(&self, other: &Scalar) -> Tensor[src]

pub fn lt1(&self, other: &Tensor) -> Tensor[src]

pub fn lt_(&self, other: &Scalar) -> Tensor[src]

pub fn lt_1(&self, other: &Tensor) -> Tensor[src]

pub fn lt_out(&self, result: &Tensor, other: &Scalar) -> Tensor[src]

pub fn lt_out1(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn margin_ranking_loss(
    input1: &Tensor,
    input2: &Tensor,
    target: &Tensor,
    margin: f64,
    reduction: i64
) -> Tensor
[src]

pub fn masked_fill_(&self, mask: &Tensor, value: &Scalar) -> Tensor[src]

pub fn masked_fill_1(&self, mask: &Tensor, value: &Tensor) -> Tensor[src]

pub fn masked_scatter_(&self, mask: &Tensor, source: &Tensor) -> Tensor[src]

pub fn masked_select(&self, mask: &Tensor) -> Tensor[src]

pub fn masked_select_out(&self, result: &Tensor, mask: &Tensor) -> Tensor[src]

pub fn matmul(&self, other: &Tensor) -> Tensor[src]

pub fn matmul_out(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn matrix_power(&self, n: i64) -> Tensor[src]

pub fn matrix_rank(&self, symmetric: bool) -> Tensor[src]

pub fn matrix_rank1(&self, tol: f64, symmetric: bool) -> Tensor[src]

pub fn max(&self) -> Tensor[src]

pub fn max1(&self, other: &Tensor) -> Tensor[src]

pub fn max2(&self, dim: i64, keepdim: bool) -> (Tensor, Tensor)[src]

pub fn max_out(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn max_out1(
    &self,
    max: &Tensor,
    max_values: &Tensor,
    dim: i64,
    keepdim: bool
) -> (Tensor, Tensor)
[src]

pub fn max_pool1d(
    &self,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool
) -> Tensor
[src]

pub fn max_pool1d_with_indices(
    &self,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool
) -> (Tensor, Tensor)
[src]

pub fn max_pool2d(
    &self,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool
) -> Tensor
[src]

pub fn max_pool2d_with_indices(
    &self,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool
) -> (Tensor, Tensor)
[src]

pub fn max_pool2d_with_indices_backward(
    &self,
    grad_output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool,
    indices: &Tensor
) -> Tensor
[src]

pub fn max_pool2d_with_indices_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool,
    indices: &Tensor
) -> Tensor
[src]

pub fn max_pool2d_with_indices_out(
    &self,
    output: &Tensor,
    indices: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool
) -> (Tensor, Tensor)
[src]

pub fn max_pool3d(
    &self,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool
) -> Tensor
[src]

pub fn max_pool3d_with_indices(
    &self,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool
) -> (Tensor, Tensor)
[src]

pub fn max_pool3d_with_indices_backward(
    &self,
    grad_output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool,
    indices: &Tensor
) -> Tensor
[src]

pub fn max_pool3d_with_indices_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool,
    indices: &Tensor
) -> Tensor
[src]

pub fn max_pool3d_with_indices_out(
    &self,
    output: &Tensor,
    indices: &Tensor,
    kernel_size: &[i64],
    stride: &[i64],
    padding: &[i64],
    dilation: &[i64],
    ceil_mode: bool
) -> (Tensor, Tensor)
[src]

pub fn max_unpool2d(&self, indices: &Tensor, output_size: &[i64]) -> Tensor[src]

pub fn max_unpool2d_backward(
    &self,
    grad_output: &Tensor,
    indices: &Tensor,
    output_size: &[i64]
) -> Tensor
[src]

pub fn max_unpool2d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    indices: &Tensor,
    output_size: &[i64]
) -> Tensor
[src]

pub fn max_unpool2d_out(
    &self,
    output: &Tensor,
    indices: &Tensor,
    output_size: &[i64]
) -> Tensor
[src]

pub fn max_unpool3d(
    &self,
    indices: &Tensor,
    output_size: &[i64],
    stride: &[i64],
    padding: &[i64]
) -> Tensor
[src]

pub fn max_unpool3d_backward(
    &self,
    grad_output: &Tensor,
    indices: &Tensor,
    output_size: &[i64],
    stride: &[i64],
    padding: &[i64]
) -> Tensor
[src]

pub fn max_unpool3d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    indices: &Tensor,
    output_size: &[i64],
    stride: &[i64],
    padding: &[i64]
) -> Tensor
[src]

pub fn max_unpool3d_out(
    &self,
    output: &Tensor,
    indices: &Tensor,
    output_size: &[i64],
    stride: &[i64],
    padding: &[i64]
) -> Tensor
[src]

pub fn max_values(&self, dim: i64, keepdim: bool) -> Tensor[src]

pub fn mean(&self) -> Tensor[src]

pub fn mean1(&self, dtype: Kind) -> Tensor[src]

pub fn mean2(&self, dim: i64, keepdim: bool) -> Tensor[src]

pub fn mean3(&self, dim: i64, dtype: Kind) -> Tensor[src]

pub fn mean4(&self, dim: i64, keepdim: bool, dtype: Kind) -> Tensor[src]

pub fn mean_out(&self, result: &Tensor, dim: i64, keepdim: bool) -> Tensor[src]

pub fn mean_out1(&self, result: &Tensor, dim: i64, dtype: Kind) -> Tensor[src]

pub fn mean_out2(
    &self,
    result: &Tensor,
    dim: i64,
    keepdim: bool,
    dtype: Kind
) -> Tensor
[src]

pub fn median(&self) -> Tensor[src]

pub fn median1(&self, dim: i64, keepdim: bool) -> (Tensor, Tensor)[src]

pub fn median_out(
    &self,
    values: &Tensor,
    indices: &Tensor,
    dim: i64,
    keepdim: bool
) -> (Tensor, Tensor)
[src]

pub fn min(&self) -> Tensor[src]

pub fn min1(&self, other: &Tensor) -> Tensor[src]

pub fn min2(&self, dim: i64, keepdim: bool) -> (Tensor, Tensor)[src]

pub fn min_out(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn min_out1(
    &self,
    min: &Tensor,
    min_indices: &Tensor,
    dim: i64,
    keepdim: bool
) -> (Tensor, Tensor)
[src]

pub fn min_values(&self, dim: i64, keepdim: bool) -> Tensor[src]

pub fn miopen_batch_norm(
    &self,
    weight: &Tensor,
    bias: Option<&Tensor>,
    running_mean: Option<&Tensor>,
    running_var: Option<&Tensor>,
    training: bool,
    exponential_average_factor: f64,
    epsilon: f64
) -> (Tensor, Tensor, Tensor)
[src]

pub fn miopen_batch_norm_backward(
    &self,
    grad_output: &Tensor,
    weight: &Tensor,
    running_mean: Option<&Tensor>,
    running_var: Option<&Tensor>,
    save_mean: Option<&Tensor>,
    save_var: Option<&Tensor>,
    epsilon: f64
) -> (Tensor, Tensor, Tensor)
[src]

pub fn miopen_convolution(
    &self,
    weight: &Tensor,
    bias: Option<&Tensor>,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn miopen_convolution_backward_bias(grad_output: &Tensor) -> Tensor[src]

pub fn miopen_convolution_backward_input(
    self_size: &[i64],
    grad_output: &Tensor,
    weight: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn miopen_convolution_backward_weight(
    &self,
    weight_size: &[i64],
    grad_output: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn miopen_convolution_transpose(
    &self,
    weight: &Tensor,
    bias: Option<&Tensor>,
    padding: &[i64],
    output_padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn miopen_convolution_transpose_backward_input(
    grad_output: &Tensor,
    weight: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn miopen_convolution_transpose_backward_weight(
    &self,
    weight_size: &[i64],
    grad_output: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    benchmark: bool,
    deterministic: bool
) -> Tensor
[src]

pub fn mkldnn_convolution(
    &self,
    weight: &Tensor,
    bias: Option<&Tensor>,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64
) -> Tensor
[src]

pub fn mkldnn_convolution_backward_input(
    self_size: &[i64],
    grad_output: &Tensor,
    weight: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    bias_defined: bool
) -> Tensor
[src]

pub fn mkldnn_convolution_backward_weights(
    &self,
    weight_size: &[i64],
    grad_output: &Tensor,
    padding: &[i64],
    stride: &[i64],
    dilation: &[i64],
    groups: i64,
    bias_defined: bool
) -> (Tensor, Tensor)
[src]

pub fn mm(&self, mat2: &Tensor) -> Tensor[src]

pub fn mm_out(&self, result: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn mode(&self, dim: i64, keepdim: bool) -> (Tensor, Tensor)[src]

pub fn mode_out(
    &self,
    values: &Tensor,
    indices: &Tensor,
    dim: i64,
    keepdim: bool
) -> (Tensor, Tensor)
[src]

pub fn mse_loss(&self, target: &Tensor, reduction: i64) -> Tensor[src]

pub fn mse_loss_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn mse_loss_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn mse_loss_out(
    &self,
    output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn g_mul(&self, other: &Tensor) -> Tensor[src]

pub fn g_mul1(&self, other: &Scalar) -> Tensor[src]

pub fn g_mul_(&self, other: &Tensor) -> Tensor[src]

pub fn g_mul_1(&self, other: &Scalar) -> Tensor[src]

pub fn mul_out(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn multilabel_margin_loss(&self, target: &Tensor, reduction: i64) -> Tensor[src]

pub fn multilabel_margin_loss_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64,
    is_target: &Tensor
) -> Tensor
[src]

pub fn multilabel_margin_loss_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64,
    is_target: &Tensor
) -> Tensor
[src]

pub fn multilabel_margin_loss_out(
    &self,
    output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn multinomial(&self, num_samples: i64, replacement: bool) -> Tensor[src]

pub fn multinomial_out(
    &self,
    result: &Tensor,
    num_samples: i64,
    replacement: bool
) -> Tensor
[src]

pub fn mv(&self, vec: &Tensor) -> Tensor[src]

pub fn mv_out(&self, result: &Tensor, vec: &Tensor) -> Tensor[src]

pub fn mvlgamma(&self, p: i64) -> Tensor[src]

pub fn mvlgamma_(&self, p: i64) -> Tensor[src]

pub fn narrow(&self, dim: i64, start: i64, length: i64) -> Tensor[src]

pub fn narrow_copy(&self, dim: i64, start: i64, length: i64) -> Tensor[src]

pub fn native_batch_norm(
    &self,
    weight: Option<&Tensor>,
    bias: Option<&Tensor>,
    running_mean: Option<&Tensor>,
    running_var: Option<&Tensor>,
    training: bool,
    momentum: f64,
    eps: f64
) -> (Tensor, Tensor, Tensor)
[src]

pub fn native_clone(&self) -> Tensor[src]

pub fn native_norm(&self) -> Tensor[src]

pub fn native_pow(&self, exponent: &Scalar) -> Tensor[src]

pub fn native_pow_out(&self, result: &Tensor, exponent: &Scalar) -> Tensor[src]

pub fn native_resize_as_(&self, the_template: &Tensor) -> Tensor[src]

pub fn native_zero_(&self) -> Tensor[src]

pub fn ne(&self, other: &Scalar) -> Tensor[src]

pub fn ne1(&self, other: &Tensor) -> Tensor[src]

pub fn ne_(&self, other: &Scalar) -> Tensor[src]

pub fn ne_1(&self, other: &Tensor) -> Tensor[src]

pub fn ne_out(&self, result: &Tensor, other: &Scalar) -> Tensor[src]

pub fn ne_out1(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn neg(&self) -> Tensor[src]

pub fn neg_(&self) -> Tensor[src]

pub fn neg_out(&self, result: &Tensor) -> Tensor[src]

pub fn g_nll_loss(
    &self,
    target: &Tensor,
    weight: &Tensor,
    reduction: i64,
    ignore_index: i64
) -> Tensor
[src]

pub fn nll_loss2d(
    &self,
    target: &Tensor,
    weight: &Tensor,
    reduction: i64,
    ignore_index: i64
) -> Tensor
[src]

pub fn nll_loss2d_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    weight: Option<&Tensor>,
    reduction: i64,
    ignore_index: i64,
    total_weight: &Tensor
) -> Tensor
[src]

pub fn nll_loss2d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    target: &Tensor,
    weight: Option<&Tensor>,
    reduction: i64,
    ignore_index: i64,
    total_weight: &Tensor
) -> Tensor
[src]

pub fn nll_loss2d_out(
    &self,
    output: &Tensor,
    target: &Tensor,
    weight: &Tensor,
    reduction: i64,
    ignore_index: i64
) -> Tensor
[src]

pub fn nll_loss_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    weight: Option<&Tensor>,
    reduction: i64,
    ignore_index: i64,
    total_weight: &Tensor
) -> Tensor
[src]

pub fn nll_loss_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    target: &Tensor,
    weight: Option<&Tensor>,
    reduction: i64,
    ignore_index: i64,
    total_weight: &Tensor
) -> Tensor
[src]

pub fn nll_loss_out(
    &self,
    output: &Tensor,
    target: &Tensor,
    weight: &Tensor,
    reduction: i64,
    ignore_index: i64
) -> Tensor
[src]

pub fn nonzero(&self) -> Tensor[src]

pub fn nonzero_out(&self, result: &Tensor) -> Tensor[src]

pub fn norm(&self) -> Tensor[src]

pub fn norm1(&self, p: &Scalar, dim: i64, keepdim: bool) -> Tensor[src]

pub fn norm_except_dim(v: &Tensor, pow: i64, dim: i64) -> Tensor[src]

pub fn norm_out(
    &self,
    result: &Tensor,
    p: &Scalar,
    dim: i64,
    keepdim: bool
) -> Tensor
[src]

pub fn normal(mean: &Tensor, std: f64) -> Tensor[src]

pub fn normal1(mean: f64, std: &Tensor) -> Tensor[src]

pub fn normal2(mean: &Tensor, std: &Tensor) -> Tensor[src]

pub fn normal_(&self, mean: f64, std: f64) -> Tensor[src]

pub fn normal_out(output: &Tensor, mean: &Tensor, std: f64) -> Tensor[src]

pub fn normal_out1(output: &Tensor, mean: f64, std: &Tensor) -> Tensor[src]

pub fn normal_out2(output: &Tensor, mean: &Tensor, std: &Tensor) -> Tensor[src]

pub fn nuclear_norm(&self, keepdim: bool) -> Tensor[src]

pub fn nuclear_norm_out(&self, result: &Tensor, keepdim: bool) -> Tensor[src]

pub fn ones(size: &[i64], options: (Kind, Device)) -> Tensor[src]

pub fn ones_like(&self) -> Tensor[src]

pub fn ones_like1(&self, options: (Kind, Device)) -> Tensor[src]

pub fn ones_out(result: &Tensor, size: &[i64]) -> Tensor[src]

pub fn orgqr(&self, input2: &Tensor) -> Tensor[src]

pub fn orgqr_out(&self, result: &Tensor, input2: &Tensor) -> Tensor[src]

pub fn ormqr(
    &self,
    input2: &Tensor,
    input3: &Tensor,
    left: bool,
    transpose: bool
) -> Tensor
[src]

pub fn ormqr_out(
    &self,
    result: &Tensor,
    input2: &Tensor,
    input3: &Tensor,
    left: bool,
    transpose: bool
) -> Tensor
[src]

pub fn pairwise_distance(
    x1: &Tensor,
    x2: &Tensor,
    p: f64,
    eps: f64,
    keepdim: bool
) -> Tensor
[src]

pub fn pdist(&self, p: f64) -> Tensor[src]

pub fn permute(&self, dims: &[i64]) -> Tensor[src]

pub fn pin_memory(&self) -> Tensor[src]

pub fn pinverse(&self, rcond: f64) -> Tensor[src]

pub fn pixel_shuffle(&self, upscale_factor: i64) -> Tensor[src]

pub fn poisson(&self) -> Tensor[src]

pub fn polygamma(&self, n: i64) -> Tensor[src]

pub fn polygamma_(&self, n: i64) -> Tensor[src]

pub fn polygamma_out(&self, result: &Tensor, n: i64) -> Tensor[src]

pub fn potri(&self, upper: bool) -> Tensor[src]

pub fn potri_out(&self, result: &Tensor, upper: bool) -> Tensor[src]

pub fn potrs(&self, input2: &Tensor, upper: bool) -> Tensor[src]

pub fn potrs_out(&self, result: &Tensor, input2: &Tensor, upper: bool) -> Tensor[src]

pub fn pow(&self, exponent: &Scalar) -> Tensor[src]

pub fn pow1(&self, exponent: &Tensor) -> Tensor[src]

pub fn pow2(self_scalar: &Scalar, exponent: &Tensor) -> Tensor[src]

pub fn pow_(&self, exponent: &Scalar) -> Tensor[src]

pub fn pow_1(&self, exponent: &Tensor) -> Tensor[src]

pub fn pow_out(&self, result: &Tensor, exponent: &Scalar) -> Tensor[src]

pub fn pow_out1(&self, result: &Tensor, exponent: &Tensor) -> Tensor[src]

pub fn pow_out2(
    result: &Tensor,
    self_scalar: &Scalar,
    exponent: &Tensor
) -> Tensor
[src]

pub fn prelu(&self, weight: &Tensor) -> Tensor[src]

pub fn prelu_backward(
    &self,
    grad_output: &Tensor,
    weight: &Tensor
) -> (Tensor, Tensor)
[src]

pub fn prod(&self) -> Tensor[src]

pub fn prod1(&self, dtype: Kind) -> Tensor[src]

pub fn prod2(&self, dim: i64, keepdim: bool) -> Tensor[src]

pub fn prod3(&self, dim: i64, dtype: Kind) -> Tensor[src]

pub fn prod4(&self, dim: i64, keepdim: bool, dtype: Kind) -> Tensor[src]

pub fn prod_out(&self, result: &Tensor, dim: i64, keepdim: bool) -> Tensor[src]

pub fn prod_out1(&self, result: &Tensor, dim: i64, dtype: Kind) -> Tensor[src]

pub fn prod_out2(
    &self,
    result: &Tensor,
    dim: i64,
    keepdim: bool,
    dtype: Kind
) -> Tensor
[src]

pub fn pstrf(&self, upper: bool) -> (Tensor, Tensor)[src]

pub fn pstrf_out(
    &self,
    u: &Tensor,
    piv: &Tensor,
    upper: bool
) -> (Tensor, Tensor)
[src]

pub fn put_(&self, index: &Tensor, source: &Tensor, accumulate: bool) -> Tensor[src]

pub fn qr(&self) -> (Tensor, Tensor)[src]

pub fn qr_out(&self, q: &Tensor, r: &Tensor) -> (Tensor, Tensor)[src]

pub fn rand(size: &[i64], options: (Kind, Device)) -> Tensor[src]

pub fn rand_like(&self) -> Tensor[src]

pub fn rand_like1(&self, options: (Kind, Device)) -> Tensor[src]

pub fn rand_out(result: &Tensor, size: &[i64]) -> Tensor[src]

pub fn randint(high: i64, size: &[i64], options: (Kind, Device)) -> Tensor[src]

pub fn randint1(
    low: i64,
    high: i64,
    size: &[i64],
    options: (Kind, Device)
) -> Tensor
[src]

pub fn randint_like(&self, high: i64) -> Tensor[src]

pub fn randint_like1(&self, low: i64, high: i64) -> Tensor[src]

pub fn randint_like2(&self, high: i64, options: (Kind, Device)) -> Tensor[src]

pub fn randint_like3(
    &self,
    low: i64,
    high: i64,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn randint_out(result: &Tensor, high: i64, size: &[i64]) -> Tensor[src]

pub fn randint_out1(
    result: &Tensor,
    low: i64,
    high: i64,
    size: &[i64]
) -> Tensor
[src]

pub fn randn(size: &[i64], options: (Kind, Device)) -> Tensor[src]

pub fn randn_like(&self) -> Tensor[src]

pub fn randn_like1(&self, options: (Kind, Device)) -> Tensor[src]

pub fn randn_out(result: &Tensor, size: &[i64]) -> Tensor[src]

pub fn random_(&self) -> Tensor[src]

pub fn random_1(&self, to_: i64) -> Tensor[src]

pub fn random_2(&self, from: i64, to_: i64) -> Tensor[src]

pub fn randperm(n: i64, options: (Kind, Device)) -> Tensor[src]

pub fn randperm_out(result: &Tensor, n: i64) -> Tensor[src]

pub fn range(start: &Scalar, end_: &Scalar, options: (Kind, Device)) -> Tensor[src]

pub fn range1(
    start: &Scalar,
    end_: &Scalar,
    step: &Scalar,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn range_out(result: &Tensor, start: &Scalar, end_: &Scalar) -> Tensor[src]

pub fn range_out1(
    result: &Tensor,
    start: &Scalar,
    end_: &Scalar,
    step: &Scalar
) -> Tensor
[src]

pub fn reciprocal(&self) -> Tensor[src]

pub fn reciprocal_(&self) -> Tensor[src]

pub fn reciprocal_out(&self, result: &Tensor) -> Tensor[src]

pub fn reflection_pad1d(&self, padding: &[i64]) -> Tensor[src]

pub fn reflection_pad1d_backward(
    &self,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn reflection_pad1d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn reflection_pad1d_out(&self, output: &Tensor, padding: &[i64]) -> Tensor[src]

pub fn reflection_pad2d(&self, padding: &[i64]) -> Tensor[src]

pub fn reflection_pad2d_backward(
    &self,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn reflection_pad2d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn reflection_pad2d_out(&self, output: &Tensor, padding: &[i64]) -> Tensor[src]

pub fn relu(&self) -> Tensor[src]

pub fn relu_(&self) -> Tensor[src]

pub fn remainder(&self, other: &Scalar) -> Tensor[src]

pub fn remainder1(&self, other: &Tensor) -> Tensor[src]

pub fn remainder_(&self, other: &Scalar) -> Tensor[src]

pub fn remainder_1(&self, other: &Tensor) -> Tensor[src]

pub fn remainder_out(&self, result: &Tensor, other: &Scalar) -> Tensor[src]

pub fn remainder_out1(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn renorm(&self, p: &Scalar, dim: i64, maxnorm: &Scalar) -> Tensor[src]

pub fn renorm_(&self, p: &Scalar, dim: i64, maxnorm: &Scalar) -> Tensor[src]

pub fn renorm_out(
    &self,
    result: &Tensor,
    p: &Scalar,
    dim: i64,
    maxnorm: &Scalar
) -> Tensor
[src]

pub fn repeat(&self, repeats: &[i64]) -> Tensor[src]

pub fn replication_pad1d(&self, padding: &[i64]) -> Tensor[src]

pub fn replication_pad1d_backward(
    &self,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn replication_pad1d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn replication_pad1d_out(&self, output: &Tensor, padding: &[i64]) -> Tensor[src]

pub fn replication_pad2d(&self, padding: &[i64]) -> Tensor[src]

pub fn replication_pad2d_backward(
    &self,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn replication_pad2d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn replication_pad2d_out(&self, output: &Tensor, padding: &[i64]) -> Tensor[src]

pub fn replication_pad3d(&self, padding: &[i64]) -> Tensor[src]

pub fn replication_pad3d_backward(
    &self,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn replication_pad3d_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    padding: &[i64]
) -> Tensor
[src]

pub fn replication_pad3d_out(&self, output: &Tensor, padding: &[i64]) -> Tensor[src]

pub fn reshape(&self, shape: &[i64]) -> Tensor[src]

pub fn reshape_as(&self, other: &Tensor) -> Tensor[src]

pub fn resize_(&self, size: &[i64]) -> Tensor[src]

pub fn resize_as_(&self, the_template: &Tensor) -> Tensor[src]

pub fn rfft(&self, signal_ndim: i64, normalized: bool, onesided: bool) -> Tensor[src]

pub fn rnn_relu(
    &self,
    hx: &Tensor,
    params: &[&Tensor],
    has_biases: bool,
    num_layers: i64,
    dropout: f64,
    train: bool,
    bidirectional: bool,
    batch_first: bool
) -> (Tensor, Tensor)
[src]

pub fn rnn_relu1(
    data: &Tensor,
    batch_sizes: &Tensor,
    hx: &Tensor,
    params: &[&Tensor],
    has_biases: bool,
    num_layers: i64,
    dropout: f64,
    train: bool,
    bidirectional: bool
) -> (Tensor, Tensor)
[src]

pub fn rnn_relu_cell(
    &self,
    hx: &Tensor,
    w_ih: &Tensor,
    w_hh: &Tensor,
    b_ih: Option<&Tensor>,
    b_hh: Option<&Tensor>
) -> Tensor
[src]

pub fn rnn_tanh(
    &self,
    hx: &Tensor,
    params: &[&Tensor],
    has_biases: bool,
    num_layers: i64,
    dropout: f64,
    train: bool,
    bidirectional: bool,
    batch_first: bool
) -> (Tensor, Tensor)
[src]

pub fn rnn_tanh1(
    data: &Tensor,
    batch_sizes: &Tensor,
    hx: &Tensor,
    params: &[&Tensor],
    has_biases: bool,
    num_layers: i64,
    dropout: f64,
    train: bool,
    bidirectional: bool
) -> (Tensor, Tensor)
[src]

pub fn rnn_tanh_cell(
    &self,
    hx: &Tensor,
    w_ih: &Tensor,
    w_hh: &Tensor,
    b_ih: Option<&Tensor>,
    b_hh: Option<&Tensor>
) -> Tensor
[src]

pub fn roipooling2d_backward(
    &self,
    rois: &Tensor,
    pooledheight: i64,
    pooledwidth: i64,
    spatialscale: f64,
    gradoutput: &Tensor,
    argmaxes: &Tensor
) -> Tensor
[src]

pub fn roll(&self, shifts: &[i64], dims: &[i64]) -> Tensor[src]

pub fn rot90(&self, k: i64, dims: &[i64]) -> Tensor[src]

pub fn round(&self) -> Tensor[src]

pub fn round_(&self) -> Tensor[src]

pub fn round_out(&self, result: &Tensor) -> Tensor[src]

pub fn rrelu(&self, training: bool) -> Tensor[src]

pub fn rrelu_(&self, training: bool) -> Tensor[src]

pub fn rrelu_with_noise(&self, noise: &Tensor, training: bool) -> Tensor[src]

pub fn rrelu_with_noise_(&self, noise: &Tensor, training: bool) -> Tensor[src]

pub fn rrelu_with_noise_out(
    &self,
    output: &Tensor,
    noise: &Tensor,
    training: bool
) -> Tensor
[src]

pub fn rsqrt(&self) -> Tensor[src]

pub fn rsqrt_(&self) -> Tensor[src]

pub fn rsqrt_out(&self, result: &Tensor) -> Tensor[src]

pub fn rsub(&self, other: &Tensor) -> Tensor[src]

pub fn rsub1(&self, other: &Scalar) -> Tensor[src]

pub fn s_native_addmm(&self, mat1: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn s_native_addmm_(&self, mat1: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn s_native_addmm_out(
    &self,
    result: &Tensor,
    mat1: &Tensor,
    mat2: &Tensor
) -> Tensor
[src]

pub fn scatter_(&self, dim: i64, index: &Tensor, src: &Tensor) -> Tensor[src]

pub fn scatter_1(&self, dim: i64, index: &Tensor, value: &Scalar) -> Tensor[src]

pub fn scatter_add_(&self, dim: i64, index: &Tensor, src: &Tensor) -> Tensor[src]

pub fn select(&self, dim: i64, index: i64) -> Tensor[src]

pub fn selu(&self) -> Tensor[src]

pub fn selu_(&self) -> Tensor[src]

pub fn set_(&self) -> Tensor[src]

pub fn set_1(&self, source: &Tensor) -> Tensor[src]

pub fn set_requires_grad(&self, r: bool) -> Tensor[src]

pub fn sigmoid(&self) -> Tensor[src]

pub fn sigmoid_(&self) -> Tensor[src]

pub fn sigmoid_out(&self, result: &Tensor) -> Tensor[src]

pub fn sign(&self) -> Tensor[src]

pub fn sign_(&self) -> Tensor[src]

pub fn sign_out(&self, result: &Tensor) -> Tensor[src]

pub fn sin(&self) -> Tensor[src]

pub fn sin_(&self) -> Tensor[src]

pub fn sin_out(&self, result: &Tensor) -> Tensor[src]

pub fn sinh(&self) -> Tensor[src]

pub fn sinh_(&self) -> Tensor[src]

pub fn sinh_out(&self, result: &Tensor) -> Tensor[src]

pub fn slice(&self, dim: i64, start: i64, end_: i64, step: i64) -> Tensor[src]

pub fn slogdet(&self) -> (Tensor, Tensor)[src]

pub fn smm(&self, mat2: &Tensor) -> Tensor[src]

pub fn smooth_l1_loss(&self, target: &Tensor, reduction: i64) -> Tensor[src]

pub fn smooth_l1_loss_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn smooth_l1_loss_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn smooth_l1_loss_out(
    &self,
    output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn soft_margin_loss(&self, target: &Tensor, reduction: i64) -> Tensor[src]

pub fn soft_margin_loss_backward(
    &self,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn soft_margin_loss_backward_out(
    &self,
    grad_input: &Tensor,
    grad_output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn soft_margin_loss_out(
    &self,
    output: &Tensor,
    target: &Tensor,
    reduction: i64
) -> Tensor
[src]

pub fn softmax(&self, dim: i64) -> Tensor[src]

pub fn softmax1(&self, dim: i64, dtype: Kind) -> Tensor[src]

pub fn softplus(&self) -> Tensor[src]

pub fn softplus_out(&self, output: &Tensor) -> Tensor[src]

pub fn softshrink(&self) -> Tensor[src]

pub fn softshrink_out(&self, output: &Tensor) -> Tensor[src]

pub fn sort(&self, dim: i64, descending: bool) -> (Tensor, Tensor)[src]

pub fn sort_out(
    &self,
    values: &Tensor,
    indices: &Tensor,
    dim: i64,
    descending: bool
) -> (Tensor, Tensor)
[src]

pub fn sparse_coo_tensor(size: &[i64], options: (Kind, Device)) -> Tensor[src]

pub fn sparse_coo_tensor1(
    indices: &Tensor,
    values: &Tensor,
    options: (Kind, Device)
) -> Tensor
[src]

pub fn sparse_coo_tensor2(
    indices: &Tensor,
    values: &Tensor,
    size: &[i64],
    options: (Kind, Device)
) -> Tensor
[src]

pub fn sparse_resize_(
    &self,
    size: &[i64],
    sparse_dim: i64,
    dense_dim: i64
) -> Tensor
[src]

pub fn sparse_resize_and_clear_(
    &self,
    size: &[i64],
    sparse_dim: i64,
    dense_dim: i64
) -> Tensor
[src]

pub fn sqrt(&self) -> Tensor[src]

pub fn sqrt_(&self) -> Tensor[src]

pub fn sqrt_out(&self, result: &Tensor) -> Tensor[src]

pub fn squeeze(&self) -> Tensor[src]

pub fn squeeze1(&self, dim: i64) -> Tensor[src]

pub fn squeeze_(&self) -> Tensor[src]

pub fn squeeze_1(&self, dim: i64) -> Tensor[src]

pub fn sspaddmm(&self, mat1: &Tensor, mat2: &Tensor) -> Tensor[src]

pub fn sspaddmm_out(
    &self,
    result: &Tensor,
    mat1: &Tensor,
    mat2: &Tensor
) -> Tensor
[src]

pub fn stack(tensors: &[&Tensor], dim: i64) -> Tensor[src]

pub fn stack_out(result: &Tensor, tensors: &[&Tensor], dim: i64) -> Tensor[src]

pub fn std(&self, unbiased: bool) -> Tensor[src]

pub fn std1(&self, dim: i64, unbiased: bool, keepdim: bool) -> Tensor[src]

pub fn std_out(
    &self,
    result: &Tensor,
    dim: i64,
    unbiased: bool,
    keepdim: bool
) -> Tensor
[src]

pub fn stft(
    &self,
    n_fft: i64,
    hop_length: i64,
    win_length: i64,
    window: Option<&Tensor>,
    normalized: bool,
    onesided: bool
) -> Tensor
[src]

pub fn g_sub(&self, other: &Tensor) -> Tensor[src]

pub fn g_sub1(&self, other: &Scalar) -> Tensor[src]

pub fn g_sub_(&self, other: &Tensor) -> Tensor[src]

pub fn g_sub_1(&self, other: &Scalar) -> Tensor[src]

pub fn sub_out(&self, result: &Tensor, other: &Tensor) -> Tensor[src]

pub fn sum(&self) -> Tensor[src]

pub fn sum1(&self, dtype: Kind) -> Tensor[src]

pub fn sum2(&self, dim: &[i64], keepdim: bool) -> Tensor[src]

pub fn sum3(&self, dim: &[i64], dtype: Kind) -> Tensor[src]

pub fn sum4(&self, dim: &[i64], keepdim: bool, dtype: Kind) -> Tensor[src]

pub fn sum_out(&self, result: &Tensor, dim: &[i64], keepdim: bool) -> Tensor[src]

pub fn sum_out1(&self, result: &Tensor, dim: &[i64], dtype: Kind) -> Tensor[src]

pub fn sum_out2(
    &self,
    result: &Tensor,
    dim: &[i64],
    keepdim: bool,
    dtype: Kind
) -> Tensor
[src]

pub fn svd(&self, some: bool, compute_uv: bool) -> (Tensor, Tensor, Tensor)[src]

pub fn svd_out(
    &self,
    u: &Tensor,
    s: &Tensor,
    v: &Tensor,
    some: bool,
    compute_uv: bool
) -> (Tensor, Tensor, Tensor)
[src]

pub fn symeig(&self, eigenvectors: bool, upper: bool) -> (Tensor, Tensor)[src]

pub fn symeig_out(
    &self,
    e: &Tensor,
    v: &Tensor,
    eigenvectors: bool,
    upper: bool
) -> (Tensor, Tensor)
[src]

pub fn tr(&self) -> Tensor[src]

pub fn t_(&self) -> Tensor[src]

pub fn take(&self, index: &Tensor) -> Tensor[src]

pub fn take_out(&self, result: &Tensor, index: &Tensor) -> Tensor[src]

pub fn tan(&self) -> Tensor[src]

pub fn tan_(&self) -> Tensor[src]

pub fn tan_out(&self, result: &Tensor) -> Tensor[src]

pub fn tanh(&self) -> Tensor[src]

pub fn tanh_(&self) -> Tensor[src]

pub fn tanh_out(&self, result: &Tensor) -> Tensor[src]

pub fn tensordot(
    &self,
    other: &Tensor,
    dims_self: &[i64],
    dims_other: &[i64]
) -> Tensor
[src]

pub fn threshold(&self, threshold: &Scalar, value: &Scalar) -> Tensor[src]

pub fn threshold_(&self, threshold: &Scalar, value: &Scalar) -> Tensor[src]

pub fn threshold_backward(
    &self,
    grad_output: &Tensor,
    threshold: &Scalar
) -> Tensor
[src]

pub fn threshold_out(
    &self,
    result: &Tensor,
    threshold: &Scalar,
    value: &Scalar
) -> Tensor
[src]

pub fn to_(&self, device: Device) -> Tensor[src]

pub fn to1(
    &self,
    options: (Kind, Device),
    non_blocking: bool,
    copy: bool
) -> Tensor
[src]

pub fn to2(&self, dtype: Kind, non_blocking: bool, copy: bool) -> Tensor[src]

pub fn to3(&self, other: &Tensor, non_blocking: bool, copy: bool) -> Tensor[src]

pub fn to4(
    &self,
    device: Device,
    dtype: Kind,
    non_blocking: bool,
    copy: bool
) -> Tensor
[src]

pub fn to_dense(&self) -> Tensor[src]

pub fn to_sparse(&self) -> Tensor[src]

pub fn to_sparse1(&self, sparse_dim: i64) -> Tensor[src]

pub fn topk(
    &self,
    k: i64,
    dim: i64,
    largest: bool,
    sorted: bool
) -> (Tensor, Tensor)
[src]

pub fn topk_out(
    &self,
    values: &Tensor,
    indices: &Tensor,
    k: i64,
    dim: i64,
    largest: bool,
    sorted: bool
) -> (Tensor, Tensor)
[src]

pub fn totype(&self, scalar_type: Kind) -> Tensor[src]

pub fn trace(&self) -> Tensor[src]

pub fn transpose(&self, dim0: i64, dim1: i64) -> Tensor[src]

pub fn transpose_(&self, dim0: i64, dim1: i64) -> Tensor[src]

pub fn tril(&self, diagonal: i64) -> Tensor[src]

pub fn tril_(&self, diagonal: i64) -> Tensor[src]

pub fn tril_out(&self, result: &Tensor, diagonal: i64) -> Tensor[src]

pub fn triplet_margin_loss(
    anchor: &Tensor,
    positive: &Tensor,
    negative: &Tensor,
    margin: f64,
    p: f64,
    eps: f64,
    swap: bool,
    reduction: i64
) -> Tensor
[src]

pub fn triu(&self, diagonal: i64) -> Tensor[src]

pub fn triu_(&self, diagonal: i64) -> Tensor[src]

pub fn triu_out(&self, result: &Tensor, diagonal: i64) -> Tensor[src]

pub fn trtrs(
    &self,
    a: &Tensor,
    upper: bool,
    transpose: bool,
    unitriangular: bool
) -> (Tensor, Tensor)
[src]

pub fn trtrs_out(
    &self,
    x: &Tensor,
    m: &Tensor,
    a: &Tensor,
    upper: bool,
    transpose: bool,
    unitriangular: bool
) -> (Tensor, Tensor)
[src]

pub fn trunc(&self) -> Tensor[src]

pub fn trunc_(&self) -> Tensor[src]

pub fn trunc_out(&self, result: &Tensor) -> Tensor[src]

pub fn type_as(&self, other: &Tensor) -> Tensor[src]

pub fn unfold(&self, dimension: i64, size: i64, step: i64) -> Tensor[src]

pub fn uniform_(&self, from: f64, to_: f64) -> Tensor[src]

pub fn unsqueeze(&self, dim: i64) -> Tensor[src]

pub fn unsqueeze_(&self, dim: i64) -> Tensor[src]

pub fn upsample_bilinear2d(
    &self,
    output_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_bilinear2d_backward(
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_bilinear2d_backward_out(
    grad_input: &Tensor,
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_bilinear2d_out(
    &self,
    output: &Tensor,
    output_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_linear1d(
    &self,
    output_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_linear1d_backward(
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_linear1d_backward_out(
    grad_input: &Tensor,
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_linear1d_out(
    &self,
    output: &Tensor,
    output_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_nearest1d(&self, output_size: &[i64]) -> Tensor[src]

pub fn upsample_nearest1d_backward(
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64]
) -> Tensor
[src]

pub fn upsample_nearest1d_backward_out(
    grad_input: &Tensor,
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64]
) -> Tensor
[src]

pub fn upsample_nearest1d_out(
    &self,
    output: &Tensor,
    output_size: &[i64]
) -> Tensor
[src]

pub fn upsample_nearest2d(&self, output_size: &[i64]) -> Tensor[src]

pub fn upsample_nearest2d_backward(
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64]
) -> Tensor
[src]

pub fn upsample_nearest2d_backward_out(
    grad_input: &Tensor,
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64]
) -> Tensor
[src]

pub fn upsample_nearest2d_out(
    &self,
    output: &Tensor,
    output_size: &[i64]
) -> Tensor
[src]

pub fn upsample_nearest3d(&self, output_size: &[i64]) -> Tensor[src]

pub fn upsample_nearest3d_backward(
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64]
) -> Tensor
[src]

pub fn upsample_nearest3d_backward_out(
    grad_input: &Tensor,
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64]
) -> Tensor
[src]

pub fn upsample_nearest3d_out(
    &self,
    output: &Tensor,
    output_size: &[i64]
) -> Tensor
[src]

pub fn upsample_trilinear3d(
    &self,
    output_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_trilinear3d_backward(
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_trilinear3d_backward_out(
    grad_input: &Tensor,
    grad_output: &Tensor,
    output_size: &[i64],
    input_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn upsample_trilinear3d_out(
    &self,
    output: &Tensor,
    output_size: &[i64],
    align_corners: bool
) -> Tensor
[src]

pub fn values(&self) -> Tensor[src]

pub fn var(&self, unbiased: bool) -> Tensor[src]

pub fn var1(&self, dim: i64, unbiased: bool, keepdim: bool) -> Tensor[src]

pub fn var_out(
    &self,
    result: &Tensor,
    dim: i64,
    unbiased: bool,
    keepdim: bool
) -> Tensor
[src]

pub fn view(&self, size: &[i64]) -> Tensor[src]

pub fn view_as(&self, other: &Tensor) -> Tensor[src]

pub fn where_(&self, condition: &Tensor, other: &Tensor) -> Tensor[src]

pub fn zero_(&self) -> Tensor[src]

pub fn zeros(size: &[i64], options: (Kind, Device)) -> Tensor[src]

pub fn zeros_like(&self) -> Tensor[src]

pub fn zeros_like1(&self, options: (Kind, Device)) -> Tensor[src]

pub fn zeros_out(result: &Tensor, size: &[i64]) -> Tensor[src]

impl Tensor[src]

pub fn to_kind(&self, kind: Kind) -> Tensor[src]

Casts a tensor to a specified kind.

pub fn nll_loss(&self, targets: &Tensor) -> Tensor[src]

impl Tensor[src]

pub fn cross_entropy_for_logits(&self, targets: &Tensor) -> Tensor[src]

Computes the cross-entropy loss based on some logits and targets.

pub fn accuracy_for_logits(&self, targets: &Tensor) -> Tensor[src]

Returns the average accuracy for some given logits assuming that targets represent ground-truth.

pub fn to_tensor(&self, device: Device) -> Tensor[src]

Moves a tensor to a specified device.

pub fn random_batch(&self, batch_size: i64) -> Tensor[src]

pub fn random_batch2(
    t1: &Tensor,
    t2: &Tensor,
    batch_size: i64,
    device: Device
) -> (Tensor, Tensor)
[src]

pub fn to_device(&self, device: Device) -> Tensor[src]

pub fn max_pool2d_default(&self, ksize: i64) -> Tensor[src]

pub fn flat_view(&self) -> Tensor[src]

Flattens a tensor.

This returns a flattened version of the given tensor. The first dimension is preserved as it is assumed to be the mini-batch dimension.

pub fn onehot(&self, labels: i64) -> Tensor[src]

Converts a tensor to a one-hot encoded version.

If the input has a size [N1, N2, ..., Nk], the returned tensor has a size [N1, ..., Nk, labels]. The returned tensor uses float values. Elements of the input vector are expected to be between 0 and labels-1.

impl Tensor[src]

pub fn apply<M: Module>(&self, m: &M) -> Tensor[src]

pub fn apply_t<M: ModuleT>(&self, m: &M, train: bool) -> Tensor[src]

Trait Implementations

impl Drop for Tensor[src]

impl<'_> From<&'_ [i64]> for Tensor[src]

impl<'_> From<&'_ [f64]> for Tensor[src]

impl From<i64> for Tensor[src]

impl From<f64> for Tensor[src]

impl<'_> From<&'_ Tensor> for Vec<f64>[src]

impl<'_> From<&'_ Tensor> for f64[src]

impl From<Tensor> for Vec<f64>[src]

impl From<Tensor> for f64[src]

impl<'_> From<&'_ Tensor> for Vec<f32>[src]

impl<'_> From<&'_ Tensor> for f32[src]

impl From<Tensor> for Vec<f32>[src]

impl From<Tensor> for f32[src]

impl<'_> From<&'_ Tensor> for Vec<i64>[src]

impl<'_> From<&'_ Tensor> for i64[src]

impl From<Tensor> for Vec<i64>[src]

impl From<Tensor> for i64[src]

impl<'_> From<&'_ Tensor> for Vec<i32>[src]

impl<'_> From<&'_ Tensor> for i32[src]

impl From<Tensor> for Vec<i32>[src]

impl From<Tensor> for i32[src]

impl<'_> From<&'_ Tensor> for Vec<i8>[src]

impl<'_> From<&'_ Tensor> for i8[src]

impl From<Tensor> for Vec<i8>[src]

impl From<Tensor> for i8[src]

impl<'_> From<&'_ Tensor> for Vec<u8>[src]

impl<'_> From<&'_ Tensor> for u8[src]

impl From<Tensor> for Vec<u8>[src]

impl From<Tensor> for u8[src]

impl Debug for Tensor[src]

impl Add<Tensor> for Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl<'_> Add<&'_ Tensor> for Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ Tensor> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl<'_> Add<Tensor> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl Add<Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl<'_> Add<&'_ Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ Scalar> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl<'_> Add<Scalar> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl Add<i64> for Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl Add<f64> for Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl<'a> Add<i64> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl<'_> Add<f64> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the + operator.

impl Sub<Tensor> for Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl<'_> Sub<&'_ Tensor> for Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ Tensor> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl<'_> Sub<Tensor> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl Sub<Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl<'_> Sub<&'_ Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ Scalar> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl<'_> Sub<Scalar> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl Sub<i64> for Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl Sub<f64> for Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl<'a> Sub<i64> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl<'_> Sub<f64> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the - operator.

impl Mul<Tensor> for Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl<'_> Mul<&'_ Tensor> for Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl<'a, '_> Mul<&'_ Tensor> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl<'_> Mul<Tensor> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl Mul<Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl<'_> Mul<&'_ Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl<'a, '_> Mul<&'_ Scalar> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl<'_> Mul<Scalar> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl Mul<i64> for Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl Mul<f64> for Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl<'a> Mul<i64> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl<'_> Mul<f64> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the * operator.

impl Div<Tensor> for Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl<'_> Div<&'_ Tensor> for Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl<'a, '_> Div<&'_ Tensor> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl<'_> Div<Tensor> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl Div<Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl<'_> Div<&'_ Scalar> for Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl<'a, '_> Div<&'_ Scalar> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl<'_> Div<Scalar> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl Div<i64> for Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl Div<f64> for Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl<'a> Div<i64> for &'a Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl<'_> Div<f64> for &'_ Tensor[src]

type Output = Tensor

The resulting type after applying the / operator.

impl AddAssign<Tensor> for Tensor[src]

impl<'_> AddAssign<&'_ Tensor> for Tensor[src]

impl AddAssign<Scalar> for Tensor[src]

impl<'_> AddAssign<&'_ Scalar> for Tensor[src]

impl AddAssign<i64> for Tensor[src]

impl AddAssign<f64> for Tensor[src]

impl SubAssign<Tensor> for Tensor[src]

impl<'_> SubAssign<&'_ Tensor> for Tensor[src]

impl SubAssign<Scalar> for Tensor[src]

impl<'_> SubAssign<&'_ Scalar> for Tensor[src]

impl SubAssign<i64> for Tensor[src]

impl SubAssign<f64> for Tensor[src]

impl MulAssign<Tensor> for Tensor[src]

impl<'_> MulAssign<&'_ Tensor> for Tensor[src]

impl MulAssign<Scalar> for Tensor[src]

impl<'_> MulAssign<&'_ Scalar> for Tensor[src]

impl MulAssign<i64> for Tensor[src]

impl MulAssign<f64> for Tensor[src]

impl DivAssign<Tensor> for Tensor[src]

impl<'_> DivAssign<&'_ Tensor> for Tensor[src]

impl DivAssign<Scalar> for Tensor[src]

impl<'_> DivAssign<&'_ Scalar> for Tensor[src]

impl DivAssign<i64> for Tensor[src]

impl DivAssign<f64> for Tensor[src]

Auto Trait Implementations

impl !Send for Tensor

impl !Sync for Tensor

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]