pub struct Autodiff<B, C = NoCheckpointing> { /* private fields */ }
Expand description
Enable auto-differentiation on a backend.
This works as a backend decorator, extending the functionality of any backend with backpropagation.
Trait Implementations§
§impl<B, C> ActivationOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
impl<B, C> ActivationOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
§fn gelu(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn gelu( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Applies the Gelu activation function. Read more
§fn relu(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn relu( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Applies the ReLU activation function. Read more
§fn sigmoid(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn sigmoid( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Applies the Sigmoid activation function. Read more
§fn log_sigmoid(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn log_sigmoid( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Applies the LogSigmoid activation function. Read more
§fn leaky_relu(
tensor: <B as Backend>::FloatTensorPrimitive,
negative_slope: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn leaky_relu( tensor: <B as Backend>::FloatTensorPrimitive, negative_slope: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
Applies the LeakyReLU activation function. Read more
§fn relu_backward(
output: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn relu_backward( output: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the ReLU activation function backward. Read more
§fn prelu(
tensor: <B as Backend>::FloatTensorPrimitive,
alpha: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn prelu( tensor: <B as Backend>::FloatTensorPrimitive, alpha: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the PReLu activation function. Read more
§fn gelu_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn gelu_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the Gelu activation function backward. Read more
§fn sigmoid_backward(
output: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn sigmoid_backward( output: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the Sigmoid activation function backward. Read more
§fn hard_sigmoid(
tensor: <B as Backend>::FloatTensorPrimitive,
alpha: <B as Backend>::FloatElem,
beta: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn hard_sigmoid( tensor: <B as Backend>::FloatTensorPrimitive, alpha: <B as Backend>::FloatElem, beta: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
Applies the hard Sigmoid activation function. Read more
§fn log_sigmoid_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn log_sigmoid_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Applies the LogSigmoid activation function backward. Read more
§impl<B, C> AutodiffBackend for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
impl<B, C> AutodiffBackend for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
§type InnerBackend = B
type InnerBackend = B
The inner backend type.
§fn grad(
tensor: &AutodiffTensor<B>,
grads: &Gradients,
) -> Option<<B as Backend>::FloatTensorPrimitive>
fn grad( tensor: &AutodiffTensor<B>, grads: &Gradients, ) -> Option<<B as Backend>::FloatTensorPrimitive>
Returns the gradients of a tensor. Read more
§fn grad_remove(
tensor: &AutodiffTensor<B>,
grads: &mut Gradients,
) -> Option<<B as Backend>::FloatTensorPrimitive>
fn grad_remove( tensor: &AutodiffTensor<B>, grads: &mut Gradients, ) -> Option<<B as Backend>::FloatTensorPrimitive>
Pops the gradients of a tensor and returns them. Read more
§fn inner(tensor: AutodiffTensor<B>) -> <B as Backend>::FloatTensorPrimitive
fn inner(tensor: AutodiffTensor<B>) -> <B as Backend>::FloatTensorPrimitive
Returns the tensor with inner backend type. Read more
§fn from_inner(tensor: <B as Backend>::FloatTensorPrimitive) -> AutodiffTensor<B>
fn from_inner(tensor: <B as Backend>::FloatTensorPrimitive) -> AutodiffTensor<B>
Converts the inner backend tensor to the autodiff backend tensor. Read more
§fn grad_replace(
tensor: &AutodiffTensor<B>,
grads: &mut <Autodiff<B, C> as AutodiffBackend>::Gradients,
grad: <B as Backend>::FloatTensorPrimitive,
)
fn grad_replace( tensor: &AutodiffTensor<B>, grads: &mut <Autodiff<B, C> as AutodiffBackend>::Gradients, grad: <B as Backend>::FloatTensorPrimitive, )
Replace the gradients of a tensor with the one provided. Read more
§fn int_inner(
tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
) -> <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::IntTensorPrimitive
fn int_inner( tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive, ) -> <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::IntTensorPrimitive
Returns the tensor with inner backend type. Read more
§fn bool_inner(
tensor: <Autodiff<B, C> as Backend>::BoolTensorPrimitive,
) -> <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::BoolTensorPrimitive
fn bool_inner( tensor: <Autodiff<B, C> as Backend>::BoolTensorPrimitive, ) -> <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::BoolTensorPrimitive
Returns the tensor with inner backend type. Read more
§fn int_from_inner(
tensor: <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::IntTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_from_inner( tensor: <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::IntTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Converts the inner backend tensor to the autodiff backend tensor. Read more
§fn bool_from_inner(
tensor: <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::BoolTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::BoolTensorPrimitive
fn bool_from_inner( tensor: <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::BoolTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::BoolTensorPrimitive
Converts the inner backend tensor to the autodiff backend tensor. Read more
§fn q_inner(
tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
) -> <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::QuantizedTensorPrimitive
fn q_inner( tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, ) -> <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::QuantizedTensorPrimitive
Returns the tensor with inner backend type. Read more
§fn q_from_inner(
tensor: <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::QuantizedTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_from_inner( tensor: <<Autodiff<B, C> as AutodiffBackend>::InnerBackend as Backend>::QuantizedTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Converts the inner backend tensor to the autodiff backend tensor. Read more
§impl<B, C> Backend for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
impl<B, C> Backend for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
§type FullPrecisionBridge = AutodiffBridge<<B as Backend>::FullPrecisionBridge>
type FullPrecisionBridge = AutodiffBridge<<B as Backend>::FullPrecisionBridge>
A bridge that can cast tensors to full precision.
§type FloatTensorPrimitive = AutodiffTensor<B>
type FloatTensorPrimitive = AutodiffTensor<B>
Tensor primitive to be used for all float operations.
§type IntTensorPrimitive = <B as Backend>::IntTensorPrimitive
type IntTensorPrimitive = <B as Backend>::IntTensorPrimitive
Tensor primitive to be used for all int operations.
§type BoolTensorPrimitive = <B as Backend>::BoolTensorPrimitive
type BoolTensorPrimitive = <B as Backend>::BoolTensorPrimitive
Tensor primitive to be used for all bool operations.
§type QuantizedTensorPrimitive = <B as Backend>::QuantizedTensorPrimitive
type QuantizedTensorPrimitive = <B as Backend>::QuantizedTensorPrimitive
Tensor primitive to be used for all quantized operations.
§type QuantizedEncoding = <B as Backend>::QuantizedEncoding
type QuantizedEncoding = <B as Backend>::QuantizedEncoding
Quantized tensor encoding type.
§fn ad_enabled() -> bool
fn ad_enabled() -> bool
If autodiff is enabled.
§impl<B, C, Bridge> BackendBridge<Autodiff<B, C>> for AutodiffBridge<Bridge>
impl<B, C, Bridge> BackendBridge<Autodiff<B, C>> for AutodiffBridge<Bridge>
§type Target = Autodiff<<Bridge as BackendBridge<B>>::Target, C>
type Target = Autodiff<<Bridge as BackendBridge<B>>::Target, C>
The target backend
§fn into_target(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
_device: Option<<<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::Device>,
) -> <<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::FloatTensorPrimitive
fn into_target( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, _device: Option<<<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::Device>, ) -> <<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::FloatTensorPrimitive
Transfer the tensor to the target backend.
§fn from_target(
tensor: <<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::FloatTensorPrimitive,
_device: Option<<Autodiff<B, C> as Backend>::Device>,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn from_target( tensor: <<AutodiffBridge<Bridge> as BackendBridge<Autodiff<B, C>>>::Target as Backend>::FloatTensorPrimitive, _device: Option<<Autodiff<B, C> as Backend>::Device>, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Transfer the tensor from the target backend.
§impl<B, C> BoolTensorOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
impl<B, C> BoolTensorOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
§fn bool_from_data(
data: TensorData,
device: &<B as Backend>::Device,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_from_data( data: TensorData, device: &<B as Backend>::Device, ) -> <B as Backend>::BoolTensorPrimitive
Creates a tensor from the data structure. Read more
§fn bool_shape(tensor: &<B as Backend>::BoolTensorPrimitive) -> Shape
fn bool_shape(tensor: &<B as Backend>::BoolTensorPrimitive) -> Shape
Returns the shape of the tensor. Read more
§async fn bool_into_data(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> TensorData
async fn bool_into_data( tensor: <B as Backend>::BoolTensorPrimitive, ) -> TensorData
Converts the tensor to a data structure. Read more
§fn bool_into_int(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn bool_into_int( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Converts bool tensor to int tensor. Read more
§fn bool_to_device(
tensor: <B as Backend>::BoolTensorPrimitive,
device: &<B as Backend>::Device,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_to_device( tensor: <B as Backend>::BoolTensorPrimitive, device: &<B as Backend>::Device, ) -> <B as Backend>::BoolTensorPrimitive
Moves the tensor to the device.
§fn bool_device(
tensor: &<B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::Device
fn bool_device( tensor: &<B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::Device
Gets the device of the tensor. Read more
§fn bool_reshape(
tensor: <B as Backend>::BoolTensorPrimitive,
shape: Shape,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_reshape( tensor: <B as Backend>::BoolTensorPrimitive, shape: Shape, ) -> <B as Backend>::BoolTensorPrimitive
Reshapes the tensor. Read more
§fn bool_slice(
tensor: <B as Backend>::BoolTensorPrimitive,
ranges: &[Range<usize>],
) -> <B as Backend>::BoolTensorPrimitive
fn bool_slice( tensor: <B as Backend>::BoolTensorPrimitive, ranges: &[Range<usize>], ) -> <B as Backend>::BoolTensorPrimitive
Gets the values from the tensor for the given ranges. Read more
§fn bool_empty(
shape: Shape,
device: &<B as Backend>::Device,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_empty( shape: Shape, device: &<B as Backend>::Device, ) -> <B as Backend>::BoolTensorPrimitive
Creates a new bool tensor. Read more
§fn bool_slice_assign(
tensor: <Autodiff<B, C> as Backend>::BoolTensorPrimitive,
ranges: &[Range<usize>],
value: <Autodiff<B, C> as Backend>::BoolTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::BoolTensorPrimitive
fn bool_slice_assign( tensor: <Autodiff<B, C> as Backend>::BoolTensorPrimitive, ranges: &[Range<usize>], value: <Autodiff<B, C> as Backend>::BoolTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::BoolTensorPrimitive
Sets the values in the tensor for the given ranges. Read more
§fn bool_cat(
tensors: Vec<<B as Backend>::BoolTensorPrimitive>,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_cat( tensors: Vec<<B as Backend>::BoolTensorPrimitive>, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Concatenates the tensors along the given dimension. Read more
§fn bool_equal(
lhs: <B as Backend>::BoolTensorPrimitive,
rhs: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_equal( lhs: <B as Backend>::BoolTensorPrimitive, rhs: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Equates the two tensors. Read more
§fn bool_not(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_not( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Inverses boolean values. Read more
§fn bool_into_float(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <Autodiff<B> as Backend>::FloatTensorPrimitive
fn bool_into_float( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <Autodiff<B> as Backend>::FloatTensorPrimitive
Converts bool tensor to float tensor. Read more
§fn bool_swap_dims(
tensor: <Autodiff<B> as Backend>::BoolTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <Autodiff<B> as Backend>::BoolTensorPrimitive
fn bool_swap_dims( tensor: <Autodiff<B> as Backend>::BoolTensorPrimitive, dim1: usize, dim2: usize, ) -> <Autodiff<B> as Backend>::BoolTensorPrimitive
Swaps two dimensions of a bool tensor. Read more
§fn bool_narrow(
tensor: <B as Backend>::BoolTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_narrow( tensor: <B as Backend>::BoolTensorPrimitive, dim: usize, start: usize, length: usize, ) -> <B as Backend>::BoolTensorPrimitive
Returns a new tensor with the given dimension narrowed to the given range. Read more
§fn bool_chunk(
tensor: <B as Backend>::BoolTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::BoolTensorPrimitive>
fn bool_chunk( tensor: <B as Backend>::BoolTensorPrimitive, chunks: usize, dim: usize, ) -> Vec<<B as Backend>::BoolTensorPrimitive>
Split the tensor along the given dimension into chunks. Read more
§fn bool_permute(
tensor: <Autodiff<B, C> as Backend>::BoolTensorPrimitive,
axes: &[usize],
) -> <Autodiff<B, C> as Backend>::BoolTensorPrimitive
fn bool_permute( tensor: <Autodiff<B, C> as Backend>::BoolTensorPrimitive, axes: &[usize], ) -> <Autodiff<B, C> as Backend>::BoolTensorPrimitive
Permutes the dimensions of a tensor. Read more
§fn bool_flip(
tensor: <B as Backend>::BoolTensorPrimitive,
axes: &[usize],
) -> <B as Backend>::BoolTensorPrimitive
fn bool_flip( tensor: <B as Backend>::BoolTensorPrimitive, axes: &[usize], ) -> <B as Backend>::BoolTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
§async fn bool_argwhere(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
async fn bool_argwhere( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Compute the indices of the elements that are non-zero, grouped by element. Read more
§async fn bool_nonzero(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> Vec<<B as Backend>::IntTensorPrimitive>
async fn bool_nonzero( tensor: <B as Backend>::BoolTensorPrimitive, ) -> Vec<<B as Backend>::IntTensorPrimitive>
Compute the indices of the elements that are non-zero. Read more
§fn bool_expand(
tensor: <B as Backend>::BoolTensorPrimitive,
shape: Shape,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_expand( tensor: <B as Backend>::BoolTensorPrimitive, shape: Shape, ) -> <B as Backend>::BoolTensorPrimitive
Broadcasts the bool
tensor
to the given shape
.§fn bool_repeat_dim(
tensor: <B as Backend>::BoolTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_repeat_dim( tensor: <B as Backend>::BoolTensorPrimitive, dim: usize, times: usize, ) -> <B as Backend>::BoolTensorPrimitive
Repeats one dimension of the tensor a given number of times along that dimension. Read more
§fn bool_not_equal(
lhs: <B as Backend>::BoolTensorPrimitive,
rhs: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_not_equal( lhs: <B as Backend>::BoolTensorPrimitive, rhs: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
§fn bool_transpose(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_transpose( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Transposes a bool tensor. Read more
§fn bool_any(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_any( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the boolean
tensor
evaluates to True. Read more§fn bool_any_dim(
tensor: <B as Backend>::BoolTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_any_dim( tensor: <B as Backend>::BoolTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
§fn bool_all(
tensor: <B as Backend>::BoolTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_all( tensor: <B as Backend>::BoolTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the boolean
tensor
evaluate to True. Read more§fn bool_all_dim(
tensor: <B as Backend>::BoolTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn bool_all_dim( tensor: <B as Backend>::BoolTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
§impl<B, C> FloatTensorOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
impl<B, C> FloatTensorOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
§fn float_from_data(
data: TensorData,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_from_data( data: TensorData, device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Creates a new tensor from the data structure. Read more
§fn float_random(
shape: Shape,
distribution: Distribution,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_random( shape: Shape, distribution: Distribution, device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Creates a new tensor with random values. Read more
§fn float_zeros(
shape: Shape,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_zeros( shape: Shape, device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Creates a new tensor with zeros. Read more
§fn float_ones(
shape: Shape,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_ones( shape: Shape, device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Creates a new tensor with ones. Read more
§fn float_shape(
tensor: &<Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> Shape
fn float_shape( tensor: &<Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> Shape
Gets the shape of the tensor. Read more
§async fn float_into_data(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> TensorData
async fn float_into_data( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> TensorData
Converts the tensor to a data structure. Read more
§fn float_device(
tensor: &<Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::Device
fn float_device( tensor: &<Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::Device
Gets the device of the tensor. Read more
§fn float_to_device(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_to_device( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Moves the tensor to the given device. Read more
§fn float_empty(
shape: Shape,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_empty( shape: Shape, device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Creates an empty tensor with the given shape. Read more
§fn float_add(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_add( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Adds two tensors together. Read more
§fn float_add_scalar(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_add_scalar( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Adds a scalar to a tensor. Read more
§fn float_sub(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_sub( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Subtracts two tensors. Read more
§fn float_sub_scalar(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_sub_scalar( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Subtracts a scalar from a tensor. Read more
§fn float_mul(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_mul( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Multiplies two tensors together element-wise.
§fn float_mul_scalar(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_mul_scalar( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Multiplies a tensor by a scalar. Read more
§fn float_div(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_div( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Divides two tensors element-wise. Read more
§fn float_div_scalar(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_div_scalar( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Divides a tensor by a scalar. Read more
§fn float_remainder_scalar(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_remainder_scalar( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Computes the modulus of a tensor given a scalar. Read more
§fn float_matmul(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_matmul( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Multiplies two tensors together using matrix multiplication. Read more
§fn float_neg(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_neg( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Negates a tensor element-wise.
§fn float_recip(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_recip( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Calculates the reciprocals element-wise
§fn float_swap_dims(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_swap_dims( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim1: usize, dim2: usize, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Swaps two dimensions of a tensor. Read more
§fn float_permute(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
axes: &[usize],
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_permute( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, axes: &[usize], ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Permutes the dimensions of a tensor. Read more
§fn float_flip(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
axes: &[usize],
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_flip( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, axes: &[usize], ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
§fn float_reshape(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
shape: Shape,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_reshape( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, shape: Shape, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Reshapes a tensor. Read more
§fn float_gather(
dim: usize,
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_gather( dim: usize, tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Gather elements from a tensor. Read more
§fn float_scatter(
dim: usize,
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
value: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_scatter( dim: usize, tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, value: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Scatter elements into a tensor. Read more
§fn float_select(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_select( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Select tensor elements along the given dimension corresponding for the given indices. Read more
§fn float_select_assign(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_select_assign( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, value: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Assign the selected elements along the given dimension corresponding for the given indices
to the given value. Read more
§fn float_slice(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
ranges: &[Range<usize>],
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_slice( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ranges: &[Range<usize>], ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Select tensor elements corresponding for the given ranges. Read more
§fn float_slice_assign(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
ranges: &[Range<usize>],
value: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_slice_assign( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ranges: &[Range<usize>], value: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Assign the selected elements corresponding for the given ranges to the given value. Read more
§fn float_mask_where(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
mask: <Autodiff<B, C> as Backend>::BoolTensorPrimitive,
source: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_mask_where( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, mask: <Autodiff<B, C> as Backend>::BoolTensorPrimitive, source: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Update the given tensor with the value tensor where the mask is true. Read more
§fn float_mask_fill(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::FloatElem,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_mask_fill( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::FloatElem, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Update the given tensor with the value where the mask is true. Read more
§fn float_equal(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_equal( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Equal comparison of two tensors. Read more
§fn float_equal_elem(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_equal_elem( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
Equal comparison of a tensor and a scalar. Read more
§fn float_greater(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_greater( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Greater than comparison of two tensors. Read more
§fn float_greater_elem(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_greater_elem( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
Greater than comparison of a tensor and a scalar. Read more
§fn float_greater_equal(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_greater_equal( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Greater than or equal comparison of two tensors. Read more
§fn float_greater_equal_elem(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_greater_equal_elem( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
Greater than or equal comparison of a tensor and a scalar. Read more
§fn float_lower(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_lower( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Less than comparison of two tensors. Read more
§fn float_lower_elem(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_lower_elem( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
Less than comparison of a tensor and a scalar. Read more
§fn float_lower_equal(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_lower_equal( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Less than or equal comparison of two tensors. Read more
§fn float_lower_equal_elem(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_lower_equal_elem( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
Less than or equal comparison of a tensor and a scalar. Read more
§fn float_detach(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_detach( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Detaches a tensor from the computation graph.
§fn float_set_require_grad(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
require_grad: bool,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_set_require_grad( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, require_grad: bool, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Sets the
require_grad
flag of a tensor.§fn float_is_require_grad(
tensor: &<Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> bool
fn float_is_require_grad( tensor: &<Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> bool
Returns the
require_grad
flag of a tensor.§fn float_mean(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_mean( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Mean of all elements in a tensor. Read more
§fn float_sum(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_sum( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Sum of all elements in a tensor. Read more
§fn float_mean_dim(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_mean_dim( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Mean of all elements in a tensor along a dimension. Read more
§fn float_sum_dim(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_sum_dim( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Sum of all elements in a tensor along a dimension. Read more
§fn float_argmax(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn float_argmax( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the indices of the maximum elements of a tensor along an axis. Read more
§fn float_argmin(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn float_argmin( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the indices of the minimum elements of a tensor along an axis. Read more
§fn float_exp(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_exp( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with exponential values. Read more
§fn float_log(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_log( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with natural logarithm values. Read more
§fn float_log1p(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_log1p( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with logarithm values of (1 + Xi). Read more
§fn float_powf_scalar(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
value: f32,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_powf_scalar( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, value: f32, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with values raised to the power of float
value
. Read more§fn float_sqrt(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_sqrt( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with square root values. Read more
§fn float_abs(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_abs( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with absolute values. Read more
§fn float_cos(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_cos( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with cosine values. Read more
§fn float_sin(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_sin( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with sine values. Read more
§fn float_tanh(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_tanh( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with tangent values. Read more
§fn float_round(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_round( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with rounded values. Read more
§fn float_floor(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_floor( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with floored values. Read more
§fn float_ceil(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_ceil( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with ceiled values. Read more
§fn float_erf(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_erf( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns a new tensor with the error function values. Read more
§fn float_cat(
tensors: Vec<<Autodiff<B, C> as Backend>::FloatTensorPrimitive>,
dim: usize,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_cat( tensors: Vec<<Autodiff<B, C> as Backend>::FloatTensorPrimitive>, dim: usize, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Concatenates tensors along a dimension. Read more
§fn float_max_dim(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_max_dim( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Gets the maximum elements of a tensor along an axis. Read more
§fn float_max_dim_with_indices(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
) -> (<Autodiff<B, C> as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn float_max_dim_with_indices( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, ) -> (<Autodiff<B, C> as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the maximum elements of a tensor along an axis and their indices. Read more
§fn float_min_dim(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_min_dim( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Gets the minimum elements of a tensor along an axis. Read more
§fn float_min_dim_with_indices(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
) -> (<Autodiff<B, C> as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn float_min_dim_with_indices( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, ) -> (<Autodiff<B, C> as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the minimum elements of a tensor along an axis and their indices. Read more
§fn float_into_int(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B> as Backend>::IntTensorPrimitive
fn float_into_int( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B> as Backend>::IntTensorPrimitive
Converts float tensor to int tensor. Read more
§fn float_powf(
lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_powf( lhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, rhs: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Element-wise power with a FloatTensor. Read more
§fn float_sign(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_sign( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Returns the signs of the float
tensor
. Read more§fn float_expand(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
shape: Shape,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_expand( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, shape: Shape, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Broadcasts the float
tensor
to the given shape
.§fn float_sort(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_sort( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, descending: bool, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Sort the elements of the input
tensor
by value in along a given dimension. Read more§fn float_sort_with_indices(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> (<Autodiff<B, C> as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn float_sort_with_indices( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, descending: bool, ) -> (<Autodiff<B, C> as Backend>::FloatTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sort the elements of the input
tensor
by value in along a given dimension. Read more§fn float_argsort(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive
fn float_argsort( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::IntTensorPrimitive
Returns the indices that sort the elements of the input
tensor
by value along a given dimension. Read more§fn float_repeat_dim(
tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
dim: usize,
times: usize,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn float_repeat_dim( tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, dim: usize, times: usize, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Repeat the tensor along the given dimension. Read more
§fn float_full(
shape: Shape,
fill_value: <B as Backend>::FloatElem,
device: &<B as Backend>::Device,
) -> <B as Backend>::FloatTensorPrimitive
fn float_full( shape: Shape, fill_value: <B as Backend>::FloatElem, device: &<B as Backend>::Device, ) -> <B as Backend>::FloatTensorPrimitive
Creates a tensor filled with given value. Read more
§fn float_clamp_min(
tensor: <B as Backend>::FloatTensorPrimitive,
min: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp_min( tensor: <B as Backend>::FloatTensorPrimitive, min: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
Clamps a tensor under a minimum value. Read more
§fn float_clamp_max(
tensor: <B as Backend>::FloatTensorPrimitive,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp_max( tensor: <B as Backend>::FloatTensorPrimitive, max: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
Clamps a tensor over a maximum value. Read more
§fn float_clamp(
tensor: <B as Backend>::FloatTensorPrimitive,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_clamp( tensor: <B as Backend>::FloatTensorPrimitive, min: <B as Backend>::FloatElem, max: <B as Backend>::FloatElem, ) -> <B as Backend>::FloatTensorPrimitive
Clamps a tensor between a minimum and maximum value. Read more
§fn float_transpose(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_transpose( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Transposes a tensor. Read more
§fn float_not_equal(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_not_equal( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
§fn float_not_equal_elem(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::BoolTensorPrimitive
fn float_not_equal_elem( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
§fn float_prod(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_prod( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Product of all elements in a tensor. Read more
§fn float_prod_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_prod_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::FloatTensorPrimitive
Product of all elements in a tensor along a dimension. Read more
§fn float_into_full_precision(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive
fn float_into_full_precision( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive
Converts a tensor to full precision. Read more
§fn float_from_full_precision(
tensor: <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_from_full_precision( tensor: <<<B as Backend>::FullPrecisionBridge as BackendBridge<B>>::Target as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Converts a tensor from full precision. Read more
§fn float_powi(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powi( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Element-wise power with an IntTensor. Read more
§fn float_powi_scalar(
lhs: <B as Backend>::FloatTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::FloatTensorPrimitive
fn float_powi_scalar( lhs: <B as Backend>::FloatTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::FloatTensorPrimitive
raises a tensor to the power of an int scalar. Read more
§fn float_max(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_max( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Gets the maximum element of a tensor. Read more
§fn float_min(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn float_min( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Gets the minimum element of a tensor. Read more
§fn float_narrow(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn float_narrow( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, start: usize, length: usize, ) -> <B as Backend>::FloatTensorPrimitive
Returns a new tensor with the given dimension narrowed to the given range. Read more
§fn float_chunk(
tensor: <B as Backend>::FloatTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::FloatTensorPrimitive>
fn float_chunk( tensor: <B as Backend>::FloatTensorPrimitive, chunks: usize, dim: usize, ) -> Vec<<B as Backend>::FloatTensorPrimitive>
Split the tensor along the given dimension into chunks. Read more
§fn float_any(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_any( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the float
tensor
evaluates to True. Read more§fn float_any_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn float_any_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
§fn float_all(
tensor: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn float_all( tensor: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the float
tensor
evaluate to True. Read more§fn float_all_dim(
tensor: <B as Backend>::FloatTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn float_all_dim( tensor: <B as Backend>::FloatTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
§impl<B, C> IntTensorOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
impl<B, C> IntTensorOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
§fn int_from_data(
data: TensorData,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_from_data( data: TensorData, device: &<Autodiff<B, C> as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Creates a tensor from the data structure. Read more
§fn int_shape(tensor: &<B as Backend>::IntTensorPrimitive) -> Shape
fn int_shape(tensor: &<B as Backend>::IntTensorPrimitive) -> Shape
Returns the shape of the tensor. Read more
§async fn int_into_data(tensor: <B as Backend>::IntTensorPrimitive) -> TensorData
async fn int_into_data(tensor: <B as Backend>::IntTensorPrimitive) -> TensorData
Converts the tensor to a data structure. Read more
§fn int_to_device(
tensor: <B as Backend>::IntTensorPrimitive,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_to_device( tensor: <B as Backend>::IntTensorPrimitive, device: &<Autodiff<B, C> as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Moves the tensor to the given device.
§fn int_device(
tensor: &<B as Backend>::IntTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::Device
fn int_device( tensor: &<B as Backend>::IntTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::Device
Gets the device of the tensor. Read more
§fn int_reshape(
tensor: <B as Backend>::IntTensorPrimitive,
shape: Shape,
) -> <B as Backend>::IntTensorPrimitive
fn int_reshape( tensor: <B as Backend>::IntTensorPrimitive, shape: Shape, ) -> <B as Backend>::IntTensorPrimitive
Reshapes the tensor. Read more
§fn int_slice(
tensor: <B as Backend>::IntTensorPrimitive,
ranges: &[Range<usize>],
) -> <B as Backend>::IntTensorPrimitive
fn int_slice( tensor: <B as Backend>::IntTensorPrimitive, ranges: &[Range<usize>], ) -> <B as Backend>::IntTensorPrimitive
Gets the element at the given indices. Read more
§fn int_empty(
shape: Shape,
device: &<Autodiff<B> as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_empty( shape: Shape, device: &<Autodiff<B> as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Creates a new int tensor. Read more
§fn int_slice_assign(
tensor: <B as Backend>::IntTensorPrimitive,
ranges: &[Range<usize>],
value: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_slice_assign( tensor: <B as Backend>::IntTensorPrimitive, ranges: &[Range<usize>], value: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sets the element at the given indices. Read more
§fn int_cat(
tensors: Vec<<B as Backend>::IntTensorPrimitive>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_cat( tensors: Vec<<B as Backend>::IntTensorPrimitive>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Concatenates the given tensors along the given dimension. Read more
§fn int_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_equal( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise equality comparison. Read more
§fn int_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_equal_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise equality comparison with a scalar. Read more
§fn int_add(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_add( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Element-wise addition. Read more
§fn int_add_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_add_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Element-wise addition with a scalar. Read more
§fn int_clamp_min(
tensor: <B as Backend>::IntTensorPrimitive,
min: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_clamp_min( tensor: <B as Backend>::IntTensorPrimitive, min: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Clamps a tensor under a minimum value. Read more
§fn int_clamp_max(
tensor: <B as Backend>::IntTensorPrimitive,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_clamp_max( tensor: <B as Backend>::IntTensorPrimitive, max: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Clamps a tensor over a maximum value. Read more
§fn int_clamp(
tensor: <B as Backend>::IntTensorPrimitive,
min: <B as Backend>::IntElem,
max: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_clamp( tensor: <B as Backend>::IntTensorPrimitive, min: <B as Backend>::IntElem, max: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Clamps a tensor between a minimum and maximum value. Read more
§fn int_sub(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_sub( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Element-wise subtraction. Read more
§fn int_sub_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_sub_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Element-wise subtraction with a scalar. Read more
§fn int_mul(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_mul( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Element-wise multiplication. Read more
§fn int_mul_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_mul_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Element-wise multiplication with a scalar. Read more
§fn int_div(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_div( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Element-wise division. Read more
§fn int_div_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_div_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Element-wise division with a scalar. Read more
§fn int_remainder_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_remainder_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Element-wise modulus with a scalar. Read more
§fn int_neg(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_neg( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Element-wise negation. Read more
§fn int_zeros(
shape: Shape,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_zeros( shape: Shape, device: &<Autodiff<B, C> as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Creates a tensor of zeros. Read more
§fn int_ones(
shape: Shape,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_ones( shape: Shape, device: &<Autodiff<B, C> as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Creates a tensor of ones. Read more
§fn int_full(
shape: Shape,
fill_value: <B as Backend>::IntElem,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_full( shape: Shape, fill_value: <B as Backend>::IntElem, device: &<Autodiff<B, C> as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Creates a tensor filled with given value. Read more
§fn int_sum(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_sum( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Sums all elements in the tensor. Read more
§fn int_sum_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_sum_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Sums all elements in the tensor along a dimension. Read more
§fn int_mean(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_mean( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Computes the mean of all elements in the tensor. Read more
§fn int_mean_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_mean_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Computes the mean of all elements in the tensor along a dimension. Read more
§fn int_repeat_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_repeat_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, times: usize, ) -> <B as Backend>::IntTensorPrimitive
Repeats the tensor along the given dimension the given number of times. Read more
§fn int_greater(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_greater( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise greater than comparison. Read more
§fn int_greater_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_greater_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise greater than comparison with a scalar. Read more
§fn int_greater_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_greater_equal( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise greater than or equal comparison. Read more
§fn int_greater_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_greater_equal_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise greater than or equal comparison with a scalar. Read more
§fn int_lower(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_lower( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise less than comparison. Read more
§fn int_lower_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_lower_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise less than comparison with a scalar. Read more
§fn int_lower_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_lower_equal( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise less than or equal comparison. Read more
§fn int_lower_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_lower_equal_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise less than or equal comparison with a scalar. Read more
§fn int_gather(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_gather( dim: usize, tensor: <B as Backend>::IntTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Gather elements from the tensor at the given indices. Read more
§fn int_scatter(
dim: usize,
tensor: <B as Backend>::IntTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_scatter( dim: usize, tensor: <B as Backend>::IntTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Scatter a given value to the tensor at the given indices. Read more
§fn int_select(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_select( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Select tensor elements along the given dimension corresponding to the given indices. Read more
§fn int_select_assign(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_select_assign( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Assign the selected elements along the given dimension corresponding to the given indices
to the given value. Read more
§fn int_mask_where(
tensor: <B as Backend>::IntTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::IntTensorPrimitive,
) -> <Autodiff<B> as Backend>::IntTensorPrimitive
fn int_mask_where( tensor: <B as Backend>::IntTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::IntTensorPrimitive, ) -> <Autodiff<B> as Backend>::IntTensorPrimitive
Fills the tensor with values from the source tensor if the mask is true at the given
indices. Read more
§fn int_mask_fill(
tensor: <B as Backend>::IntTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::IntElem,
) -> <Autodiff<B> as Backend>::IntTensorPrimitive
fn int_mask_fill( tensor: <B as Backend>::IntTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::IntElem, ) -> <Autodiff<B> as Backend>::IntTensorPrimitive
Fills the tensor with the given value if the mask is true at the given indices. Read more
§fn int_argmax(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_argmax( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the indices of the maximum elements along a dimension. Read more
§fn int_argmin(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_argmin( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the indices of the minimum elements along a dimension. Read more
§fn int_max(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_max( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Gets the maximum element in the tensor. Read more
§fn int_max_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_max_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the maximum element in the tensor along a dimension. Read more
§fn int_max_dim_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn int_max_dim_with_indices( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the maximum elements and corresponding indices along a dimension. Read more
§fn int_min(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_min( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Gets the minimum element in the tensor. Read more
§fn int_min_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn int_min_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the minimum elements in the tensor along a dimension. Read more
§fn int_min_dim_with_indices(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn int_min_dim_with_indices( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> (<B as Backend>::IntTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the minimum elements and corresponding indices along a dimension. Read more
§fn int_abs(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_abs( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Returns a new tensor with absolute values. Read more
§fn int_into_float(
tensor: <Autodiff<B> as Backend>::IntTensorPrimitive,
) -> <Autodiff<B> as Backend>::FloatTensorPrimitive
fn int_into_float( tensor: <Autodiff<B> as Backend>::IntTensorPrimitive, ) -> <Autodiff<B> as Backend>::FloatTensorPrimitive
Converts int tensor to float tensor. Read more
§fn int_swap_dims(
tensor: <Autodiff<B> as Backend>::IntTensorPrimitive,
dim1: usize,
dim2: usize,
) -> <Autodiff<B> as Backend>::IntTensorPrimitive
fn int_swap_dims( tensor: <Autodiff<B> as Backend>::IntTensorPrimitive, dim1: usize, dim2: usize, ) -> <Autodiff<B> as Backend>::IntTensorPrimitive
Swaps two dimensions of an int tensor. Read more
§fn int_narrow(
tensor: <Autodiff<B> as Backend>::IntTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <Autodiff<B> as Backend>::IntTensorPrimitive
fn int_narrow( tensor: <Autodiff<B> as Backend>::IntTensorPrimitive, dim: usize, start: usize, length: usize, ) -> <Autodiff<B> as Backend>::IntTensorPrimitive
Returns a new tensor with the given dimension narrowed to the given range. Read more
§fn int_chunk(
tensor: <Autodiff<B> as Backend>::IntTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<Autodiff<B> as Backend>::IntTensorPrimitive>
fn int_chunk( tensor: <Autodiff<B> as Backend>::IntTensorPrimitive, chunks: usize, dim: usize, ) -> Vec<<Autodiff<B> as Backend>::IntTensorPrimitive>
Split the tensor along the given dimension into chunks. Read more
§fn int_random(
shape: Shape,
distribution: Distribution,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_random( shape: Shape, distribution: Distribution, device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Creates a new int tensor with random values. Read more
§fn int_arange(
range: Range<i64>,
device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_arange( range: Range<i64>, device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Creates a new tensor with values from the given range. Read more
§fn int_permute(
tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
axes: &[usize],
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_permute( tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive, axes: &[usize], ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Permutes the dimensions of a tensor. Read more
§fn int_flip(
tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
axes: &[usize],
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_flip( tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive, axes: &[usize], ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
§fn int_sign(
tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_sign( tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Returns the signs of the int
tensor
. Read more§fn int_prod(
tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_prod( tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Computes the product of all elements in the tensor. Read more
§fn int_prod_dim(
tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
dim: usize,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_prod_dim( tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive, dim: usize, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Computes the product of all elements in the tensor along a dimension. Read more
§fn int_expand(
tensor: <B as Backend>::IntTensorPrimitive,
shape: Shape,
) -> <B as Backend>::IntTensorPrimitive
fn int_expand( tensor: <B as Backend>::IntTensorPrimitive, shape: Shape, ) -> <B as Backend>::IntTensorPrimitive
Broadcasts the int
tensor
to the given shape
.§fn int_sort(
tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_sort( tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive, dim: usize, descending: bool, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Sort the elements of the input
tensor
by value along a given dimension. Read more§fn int_sort_with_indices(
tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> (<Autodiff<B, C> as Backend>::IntTensorPrimitive, <Autodiff<B, C> as Backend>::IntTensorPrimitive)
fn int_sort_with_indices( tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive, dim: usize, descending: bool, ) -> (<Autodiff<B, C> as Backend>::IntTensorPrimitive, <Autodiff<B, C> as Backend>::IntTensorPrimitive)
Sort the elements of the input
tensor
by value along a given dimension. Read more§fn int_argsort(
tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
dim: usize,
descending: bool,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn int_argsort( tensor: <Autodiff<B, C> as Backend>::IntTensorPrimitive, dim: usize, descending: bool, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Returns the indices that sort the elements of the input
tensor
by value
along a given dimension. Read more§fn int_not_equal(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_not_equal( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison. Read more
§fn int_not_equal_elem(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::BoolTensorPrimitive
fn int_not_equal_elem( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality comparison with a scalar. Read more
§fn int_powi(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_powi( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a IntTensor. Read more
§fn int_powf(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_powf( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a floatTensor. Read more
§fn int_powi_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::IntTensorPrimitive
fn int_powi_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a scalar. Read more
§fn int_powf_scalar(
lhs: <B as Backend>::IntTensorPrimitive,
rhs: f32,
) -> <B as Backend>::IntTensorPrimitive
fn int_powf_scalar( lhs: <B as Backend>::IntTensorPrimitive, rhs: f32, ) -> <B as Backend>::IntTensorPrimitive
Element-wise power with a floatTensor. Read more
§fn int_transpose(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::IntTensorPrimitive
fn int_transpose( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::IntTensorPrimitive
Transposes an int tensor. Read more
§fn int_arange_step(
range: Range<i64>,
step: usize,
device: &<B as Backend>::Device,
) -> <B as Backend>::IntTensorPrimitive
fn int_arange_step( range: Range<i64>, step: usize, device: &<B as Backend>::Device, ) -> <B as Backend>::IntTensorPrimitive
Creates a new tensor with values from the given range with the given step size. Read more
§fn int_any(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_any( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the int
tensor
evaluates to True. Read more§fn int_any_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn int_any_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
§fn int_all(
tensor: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn int_all( tensor: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the int
tensor
evaluate to True. Read more§fn int_all_dim(
tensor: <B as Backend>::IntTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn int_all_dim( tensor: <B as Backend>::IntTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
§impl<B, C> ModuleOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
impl<B, C> ModuleOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
§fn embedding(
weights: AutodiffTensor<B>,
indices: <B as Backend>::IntTensorPrimitive,
) -> AutodiffTensor<B>
fn embedding( weights: AutodiffTensor<B>, indices: <B as Backend>::IntTensorPrimitive, ) -> AutodiffTensor<B>
Embedding operation. Read more
§fn embedding_backward(
_weights: AutodiffTensor<B>,
_output: AutodiffTensor<B>,
_indices: <B as Backend>::IntTensorPrimitive,
) -> AutodiffTensor<B>
fn embedding_backward( _weights: AutodiffTensor<B>, _output: AutodiffTensor<B>, _indices: <B as Backend>::IntTensorPrimitive, ) -> AutodiffTensor<B>
Embedding backward operation. Read more
§fn conv1d(
x: AutodiffTensor<B>,
weight: AutodiffTensor<B>,
bias: Option<AutodiffTensor<B>>,
options: ConvOptions<1>,
) -> AutodiffTensor<B>
fn conv1d( x: AutodiffTensor<B>, weight: AutodiffTensor<B>, bias: Option<AutodiffTensor<B>>, options: ConvOptions<1>, ) -> AutodiffTensor<B>
One dimensional convolution. Read more
§fn conv_transpose1d(
x: AutodiffTensor<B>,
weight: AutodiffTensor<B>,
bias: Option<AutodiffTensor<B>>,
options: ConvTransposeOptions<1>,
) -> AutodiffTensor<B>
fn conv_transpose1d( x: AutodiffTensor<B>, weight: AutodiffTensor<B>, bias: Option<AutodiffTensor<B>>, options: ConvTransposeOptions<1>, ) -> AutodiffTensor<B>
One dimensional transposed convolution. Read more
§fn conv2d(
x: AutodiffTensor<B>,
weight: AutodiffTensor<B>,
bias: Option<AutodiffTensor<B>>,
options: ConvOptions<2>,
) -> AutodiffTensor<B>
fn conv2d( x: AutodiffTensor<B>, weight: AutodiffTensor<B>, bias: Option<AutodiffTensor<B>>, options: ConvOptions<2>, ) -> AutodiffTensor<B>
Two dimensional convolution. Read more
§fn deform_conv2d(
x: AutodiffTensor<B>,
offset: AutodiffTensor<B>,
weight: AutodiffTensor<B>,
mask: Option<AutodiffTensor<B>>,
bias: Option<AutodiffTensor<B>>,
options: DeformConvOptions<2>,
) -> AutodiffTensor<B>
fn deform_conv2d( x: AutodiffTensor<B>, offset: AutodiffTensor<B>, weight: AutodiffTensor<B>, mask: Option<AutodiffTensor<B>>, bias: Option<AutodiffTensor<B>>, options: DeformConvOptions<2>, ) -> AutodiffTensor<B>
Two dimensional deformable convolution. Read more
§fn deform_conv2d_backward(
_x: AutodiffTensor<B>,
_offset: AutodiffTensor<B>,
_weight: AutodiffTensor<B>,
_mask: Option<AutodiffTensor<B>>,
_bias: Option<AutodiffTensor<B>>,
_output_grad: AutodiffTensor<B>,
_options: DeformConvOptions<2>,
) -> DeformConv2dBackward<Autodiff<B, C>>
fn deform_conv2d_backward( _x: AutodiffTensor<B>, _offset: AutodiffTensor<B>, _weight: AutodiffTensor<B>, _mask: Option<AutodiffTensor<B>>, _bias: Option<AutodiffTensor<B>>, _output_grad: AutodiffTensor<B>, _options: DeformConvOptions<2>, ) -> DeformConv2dBackward<Autodiff<B, C>>
Backward pass for the deform_conv2d operation.
§fn conv_transpose2d(
x: AutodiffTensor<B>,
weight: AutodiffTensor<B>,
bias: Option<AutodiffTensor<B>>,
options: ConvTransposeOptions<2>,
) -> AutodiffTensor<B>
fn conv_transpose2d( x: AutodiffTensor<B>, weight: AutodiffTensor<B>, bias: Option<AutodiffTensor<B>>, options: ConvTransposeOptions<2>, ) -> AutodiffTensor<B>
Two dimensional transposed convolution. Read more
§fn conv3d(
x: AutodiffTensor<B>,
weight: AutodiffTensor<B>,
bias: Option<AutodiffTensor<B>>,
options: ConvOptions<3>,
) -> AutodiffTensor<B>
fn conv3d( x: AutodiffTensor<B>, weight: AutodiffTensor<B>, bias: Option<AutodiffTensor<B>>, options: ConvOptions<3>, ) -> AutodiffTensor<B>
Three dimensional convolution. Read more
§fn conv_transpose3d(
x: AutodiffTensor<B>,
weight: AutodiffTensor<B>,
bias: Option<AutodiffTensor<B>>,
options: ConvTransposeOptions<3>,
) -> AutodiffTensor<B>
fn conv_transpose3d( x: AutodiffTensor<B>, weight: AutodiffTensor<B>, bias: Option<AutodiffTensor<B>>, options: ConvTransposeOptions<3>, ) -> AutodiffTensor<B>
Three dimensional transposed convolution. Read more
§fn avg_pool1d(
x: AutodiffTensor<B>,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
) -> AutodiffTensor<B>
fn avg_pool1d( x: AutodiffTensor<B>, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool, ) -> AutodiffTensor<B>
One dimensional avg pooling. Read more
§fn avg_pool2d(
x: AutodiffTensor<B>,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
) -> AutodiffTensor<B>
fn avg_pool2d( x: AutodiffTensor<B>, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], count_include_pad: bool, ) -> AutodiffTensor<B>
Two dimensional avg pooling. Read more
§fn avg_pool2d_backward(
_x: AutodiffTensor<B>,
_grad: AutodiffTensor<B>,
_kernel_size: [usize; 2],
_stride: [usize; 2],
_padding: [usize; 2],
_count_include_pad: bool,
) -> AutodiffTensor<B>
fn avg_pool2d_backward( _x: AutodiffTensor<B>, _grad: AutodiffTensor<B>, _kernel_size: [usize; 2], _stride: [usize; 2], _padding: [usize; 2], _count_include_pad: bool, ) -> AutodiffTensor<B>
Backward pass for the avg pooling 2d operation.
§fn max_pool1d(
x: AutodiffTensor<B>,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
) -> AutodiffTensor<B>
fn max_pool1d( x: AutodiffTensor<B>, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ) -> AutodiffTensor<B>
One dimensional max pooling. Read more
§fn max_pool1d_with_indices(
x: AutodiffTensor<B>,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
) -> MaxPool1dWithIndices<Autodiff<B, C>>
fn max_pool1d_with_indices( x: AutodiffTensor<B>, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ) -> MaxPool1dWithIndices<Autodiff<B, C>>
One dimensional max pooling with indices. Read more
§fn max_pool1d_with_indices_backward(
x: AutodiffTensor<B>,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
output_grad: AutodiffTensor<B>,
indices: <B as Backend>::IntTensorPrimitive,
) -> MaxPool1dBackward<Autodiff<B, C>>
fn max_pool1d_with_indices_backward( x: AutodiffTensor<B>, kernel_size: usize, stride: usize, padding: usize, dilation: usize, output_grad: AutodiffTensor<B>, indices: <B as Backend>::IntTensorPrimitive, ) -> MaxPool1dBackward<Autodiff<B, C>>
Backward pass for the max pooling 1d operation.
§fn max_pool2d(
x: AutodiffTensor<B>,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
) -> AutodiffTensor<B>
fn max_pool2d( x: AutodiffTensor<B>, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ) -> AutodiffTensor<B>
Two dimensional max pooling. Read more
§fn max_pool2d_with_indices(
x: AutodiffTensor<B>,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
) -> MaxPool2dWithIndices<Autodiff<B, C>>
fn max_pool2d_with_indices( x: AutodiffTensor<B>, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ) -> MaxPool2dWithIndices<Autodiff<B, C>>
Two dimensional max pooling with indices. Read more
§fn max_pool2d_with_indices_backward(
_x: AutodiffTensor<B>,
_kernel_size: [usize; 2],
_stride: [usize; 2],
_padding: [usize; 2],
_dilation: [usize; 2],
_output_grad: AutodiffTensor<B>,
_indices: <B as Backend>::IntTensorPrimitive,
) -> MaxPool2dBackward<Autodiff<B, C>>
fn max_pool2d_with_indices_backward( _x: AutodiffTensor<B>, _kernel_size: [usize; 2], _stride: [usize; 2], _padding: [usize; 2], _dilation: [usize; 2], _output_grad: AutodiffTensor<B>, _indices: <B as Backend>::IntTensorPrimitive, ) -> MaxPool2dBackward<Autodiff<B, C>>
Backward pass for the max pooling 2d operation.
§fn adaptive_avg_pool1d(
x: AutodiffTensor<B>,
output_size: usize,
) -> AutodiffTensor<B>
fn adaptive_avg_pool1d( x: AutodiffTensor<B>, output_size: usize, ) -> AutodiffTensor<B>
One dimensional adaptive avg pooling. Read more
§fn adaptive_avg_pool2d(
x: AutodiffTensor<B>,
output_size: [usize; 2],
) -> AutodiffTensor<B>
fn adaptive_avg_pool2d( x: AutodiffTensor<B>, output_size: [usize; 2], ) -> AutodiffTensor<B>
Two dimensional adaptive avg pooling. Read more
§fn adaptive_avg_pool2d_backward(
_x: AutodiffTensor<B>,
_grad: AutodiffTensor<B>,
) -> <Autodiff<B> as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool2d_backward( _x: AutodiffTensor<B>, _grad: AutodiffTensor<B>, ) -> <Autodiff<B> as Backend>::FloatTensorPrimitive
Backward pass for the adaptive avg pooling 2d operation.
§fn interpolate(
x: AutodiffTensor<B>,
output_size: [usize; 2],
options: InterpolateOptions,
) -> AutodiffTensor<B>
fn interpolate( x: AutodiffTensor<B>, output_size: [usize; 2], options: InterpolateOptions, ) -> AutodiffTensor<B>
Down/up samples the input. Read more
§fn interpolate_backward(
_x: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
_grad: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
_output_size: [usize; 2],
_options: InterpolateOptions,
) -> <Autodiff<B> as Backend>::FloatTensorPrimitive
fn interpolate_backward( _x: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, _grad: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, _output_size: [usize; 2], _options: InterpolateOptions, ) -> <Autodiff<B> as Backend>::FloatTensorPrimitive
Backward pass for the interpolate operation.
§fn conv1d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d_x_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
x
.§fn conv1d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
weight
.§fn conv1d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for
bias
.§fn conv2d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d_x_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
x
.§fn conv2d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
weight
.§fn conv2d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for
bias
.§fn conv3d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d_x_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
x
.§fn conv3d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
weight
.§fn conv3d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for
bias
.§fn conv_transpose1d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d_x_backward( weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for
x
.§fn conv_transpose1d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for
weight
.§fn conv_transpose1d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for
bias
.§fn conv_transpose2d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d_x_backward( weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for
x
.§fn conv_transpose2d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for
weight
.§fn conv_transpose2d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for
bias
.§fn conv_transpose3d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d_x_backward( weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for
x
.§fn conv_transpose3d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for
weight
.§fn conv_transpose3d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for
bias
.§fn unfold4d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
options: UnfoldOptions,
) -> <B as Backend>::FloatTensorPrimitive
fn unfold4d( x: <B as Backend>::FloatTensorPrimitive, kernel_size: [usize; 2], options: UnfoldOptions, ) -> <B as Backend>::FloatTensorPrimitive
Four-dimensional unfolding. Read more
§fn avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn avg_pool1d_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the avg pooling 1d operation.
§fn adaptive_avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool1d_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the adaptive avg pooling 1d operation.
§impl<B, C> QTensorOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
impl<B, C> QTensorOps<Autodiff<B, C>> for Autodiff<B, C>where
B: Backend,
C: CheckpointStrategy,
§fn q_from_data(
_data: TensorData,
_device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_from_data( _data: TensorData, _device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Creates a new tensor from the data structure. Read more
§fn quantize(
_tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
_scheme: &QuantizationScheme,
_qparams: QuantizationParametersPrimitive<Autodiff<B, C>>,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn quantize( _tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, _scheme: &QuantizationScheme, _qparams: QuantizationParametersPrimitive<Autodiff<B, C>>, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Convert the tensor to a lower precision data type based on the quantization scheme and parameters.
§fn quantize_dynamic(
_tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive,
_scheme: &QuantizationScheme,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn quantize_dynamic( _tensor: <Autodiff<B, C> as Backend>::FloatTensorPrimitive, _scheme: &QuantizationScheme, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Dynamically convert the tensor to a lower precision data type based on the quantization scheme.
§fn dequantize(
_tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
fn dequantize( _tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::FloatTensorPrimitive
Convert the tensor back to a higher precision data type.
§fn q_shape(
tensor: &<Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
) -> Shape
fn q_shape( tensor: &<Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, ) -> Shape
Gets the shape of the tensor. Read more
§fn q_device(
tensor: &<Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::Device
fn q_device( tensor: &<Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::Device
Gets the device of the tensor. Read more
§fn q_to_device(
_tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
_device: &<Autodiff<B, C> as Backend>::Device,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_to_device( _tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, _device: &<Autodiff<B, C> as Backend>::Device, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Moves the tensor to the given device. Read more
§fn q_reshape(
tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
shape: Shape,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_reshape( tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, shape: Shape, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Reshapes a tensor. Read more
§async fn q_into_data(
tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
) -> TensorData
async fn q_into_data( tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, ) -> TensorData
Converts the tensor to a data structure. Read more
§fn q_swap_dims(
_tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
_dim1: usize,
_dim2: usize,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_swap_dims( _tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, _dim1: usize, _dim2: usize, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Swaps two dimensions of a tensor. Read more
§fn q_permute(
_tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
_axes: &[usize],
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_permute( _tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, _axes: &[usize], ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Permutes the dimensions of a tensor. Read more
§fn q_flip(
_tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
_axes: &[usize],
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_flip( _tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, _axes: &[usize], ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Reverse the order of elements in a tensor along the given axes. Read more
§fn q_gather(
_dim: usize,
_tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
_indices: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_gather( _dim: usize, _tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, _indices: <Autodiff<B, C> as Backend>::IntTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Gather elements from a tensor. Read more
§fn q_select(
_tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
_dim: usize,
_indices: <Autodiff<B, C> as Backend>::IntTensorPrimitive,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_select( _tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, _dim: usize, _indices: <Autodiff<B, C> as Backend>::IntTensorPrimitive, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Select tensor elements along the given dimension corresponding for the given indices. Read more
§fn q_slice(
_tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
_ranges: &[Range<usize>],
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_slice( _tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, _ranges: &[Range<usize>], ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Select tensor elements corresponding for the given ranges. Read more
§fn q_argmax(
tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn q_argmax( tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Gets the indices of the maximum elements of a tensor along an axis. Read more
§fn q_argmin(
tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
fn q_argmin( tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <Autodiff<B, C> as Backend>::IntTensorPrimitive
Gets the indices of the minimum elements of a tensor along an axis. Read more
§fn q_expand(
_tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive,
_shape: Shape,
) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
fn q_expand( _tensor: <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive, _shape: Shape, ) -> <Autodiff<B, C> as Backend>::QuantizedTensorPrimitive
Broadcasts the
tensor
to the given shape
.§fn q_detach(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_detach( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Detaches a tensor from the computation graph.
§fn q_set_require_grad(
tensor: <B as Backend>::QuantizedTensorPrimitive,
_require_grad: bool,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_set_require_grad( tensor: <B as Backend>::QuantizedTensorPrimitive, _require_grad: bool, ) -> <B as Backend>::QuantizedTensorPrimitive
Sets the
require_grad
flag of a tensor.§fn q_is_require_grad(_tensor: &<B as Backend>::QuantizedTensorPrimitive) -> bool
fn q_is_require_grad(_tensor: &<B as Backend>::QuantizedTensorPrimitive) -> bool
Returns the
require_grad
flag of a tensor.§fn q_repeat_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
times: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_repeat_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, times: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Repeat the tensor along the given dimension. Read more
§fn q_add(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_add( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Adds two tensors together. Read more
§fn q_add_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_add_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Adds a scalar to a tensor. Read more
§fn q_clamp_min(
tensor: <B as Backend>::QuantizedTensorPrimitive,
min: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_clamp_min( tensor: <B as Backend>::QuantizedTensorPrimitive, min: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Clamps a tensor under a minimum value. Read more
§fn q_clamp_max(
tensor: <B as Backend>::QuantizedTensorPrimitive,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_clamp_max( tensor: <B as Backend>::QuantizedTensorPrimitive, max: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Clamps a tensor over a maximum value. Read more
§fn q_clamp(
tensor: <B as Backend>::QuantizedTensorPrimitive,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_clamp( tensor: <B as Backend>::QuantizedTensorPrimitive, min: <B as Backend>::FloatElem, max: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Clamps a tensor between a minimum and maximum value. Read more
§fn q_sub(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sub( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Subtracts two tensors. Read more
§fn q_sub_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sub_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Subtracts a scalar from a tensor. Read more
§fn q_mul(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mul( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Multiplies two tensors together element-wise.
§fn q_mul_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mul_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Multiplies a tensor by a scalar. Read more
§fn q_div(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_div( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Divides two tensors element-wise. Read more
§fn q_div_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_div_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Divides a tensor by a scalar. Read more
§fn q_remainder_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_remainder_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Computes the modulus of a tensor given a scalar. Read more
§fn q_matmul(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_matmul( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Multiplies two tensors together using matrix multiplication. Read more
§fn q_neg(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_neg( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Negates a tensor element-wise.
§fn q_recip(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_recip( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Calculates the reciprocals element-wise
§fn q_transpose(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_transpose( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Transposes a tensor. Read more
§fn q_scatter(
dim: usize,
tensor: <B as Backend>::QuantizedTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_scatter( dim: usize, tensor: <B as Backend>::QuantizedTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Scatter elements into a tensor. Read more
§fn q_select_assign(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
indices: <B as Backend>::IntTensorPrimitive,
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_select_assign( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, indices: <B as Backend>::IntTensorPrimitive, value: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Assign the selected elements along the given dimension corresponding for the given indices
to the given value. Read more
§fn q_slice_assign(
tensor: <B as Backend>::QuantizedTensorPrimitive,
ranges: &[Range<usize>],
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_slice_assign( tensor: <B as Backend>::QuantizedTensorPrimitive, ranges: &[Range<usize>], value: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Assign the selected elements corresponding for the given ranges to the given value. Read more
§fn q_mask_where(
tensor: <B as Backend>::QuantizedTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mask_where( tensor: <B as Backend>::QuantizedTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Update the given tensor with the value tensor where the mask is true. Read more
§fn q_mask_fill(
tensor: <B as Backend>::QuantizedTensorPrimitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <B as Backend>::FloatElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mask_fill( tensor: <B as Backend>::QuantizedTensorPrimitive, mask: <B as Backend>::BoolTensorPrimitive, value: <B as Backend>::FloatElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Update the given tensor with the value where the mask is true. Read more
§fn q_sum(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sum( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Sum of all elements in a tensor. Read more
§fn q_sum_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sum_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Sum of all elements in a tensor along a dimension. Read more
§fn q_prod(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_prod( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Product of all elements in a tensor. Read more
§fn q_prod_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_prod_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Product of all elements in a tensor along a dimension. Read more
§fn q_mean(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mean( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Mean of all elements in a tensor. Read more
§fn q_mean_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_mean_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Mean of all elements in a tensor along a dimension. Read more
§fn q_exp(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_exp( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with exponential values. Read more
§fn q_log(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_log( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with natural logarithm values. Read more
§fn q_log1p(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_log1p( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with logarithm values of (1 + Xi). Read more
§fn q_powf(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_powf( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Element-wise power with another tensor. Read more
§fn q_powi(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_powi( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Element-wise power with an IntTensor. Read more
§fn q_powi_scalar(
lhs: <B as Backend>::QuantizedTensorPrimitive,
rhs: <B as Backend>::IntElem,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_powi_scalar( lhs: <B as Backend>::QuantizedTensorPrimitive, rhs: <B as Backend>::IntElem, ) -> <B as Backend>::QuantizedTensorPrimitive
Element-wise power with an int scalar. Read more
§fn q_powf_scalar(
tensor: <B as Backend>::QuantizedTensorPrimitive,
value: f32,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_powf_scalar( tensor: <B as Backend>::QuantizedTensorPrimitive, value: f32, ) -> <B as Backend>::QuantizedTensorPrimitive
Element-wise power with a float scalar. Read more
§fn q_sqrt(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sqrt( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with square root values. Read more
§fn q_abs(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_abs( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with absolute values. Read more
§fn q_cos(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_cos( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with cosine values. Read more
§fn q_sin(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sin( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with sine values. Read more
§fn q_tanh(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_tanh( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with tangent values. Read more
§fn q_erf(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_erf( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with the error function values. Read more
§fn q_cat(
tensors: Vec<<B as Backend>::QuantizedTensorPrimitive>,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_cat( tensors: Vec<<B as Backend>::QuantizedTensorPrimitive>, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Concatenates tensors along a dimension. Read more
§fn q_max(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the maximum element of a tensor. Read more
§fn q_max_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_max_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the maximum elements of a tensor along an axis. Read more
§fn q_max_dim_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn q_max_dim_with_indices( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the maximum elements of a tensor along an axis and their indices. Read more
§fn q_min(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_min( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the minimum element of a tensor. Read more
§fn q_min_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_min_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Gets the minimum elements of a tensor along an axis. Read more
§fn q_min_dim_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn q_min_dim_with_indices( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Gets the minimum elements of a tensor along an axis and their indices. Read more
§fn q_narrow(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
start: usize,
length: usize,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_narrow( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, start: usize, length: usize, ) -> <B as Backend>::QuantizedTensorPrimitive
Returns a new tensor with the given dimension narrowed to the given range. Read more
§fn q_chunk(
tensor: <B as Backend>::QuantizedTensorPrimitive,
chunks: usize,
dim: usize,
) -> Vec<<B as Backend>::QuantizedTensorPrimitive>
fn q_chunk( tensor: <B as Backend>::QuantizedTensorPrimitive, chunks: usize, dim: usize, ) -> Vec<<B as Backend>::QuantizedTensorPrimitive>
Split the tensor along the given dimension into chunks. Read more
§fn q_any(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn q_any( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the
tensor
evaluates to True. Read more§fn q_any_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn q_any_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
§fn q_all(
tensor: <B as Backend>::QuantizedTensorPrimitive,
) -> <B as Backend>::BoolTensorPrimitive
fn q_all( tensor: <B as Backend>::QuantizedTensorPrimitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the
tensor
evaluate to True. Read more§fn q_all_dim(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn q_all_dim( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
§fn q_sort(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::QuantizedTensorPrimitive
fn q_sort( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::QuantizedTensorPrimitive
Sort the elements of the input
tensor
by value in along a given dimension. Read more§fn q_sort_with_indices(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
fn q_sort_with_indices( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> (<B as Backend>::QuantizedTensorPrimitive, <B as Backend>::IntTensorPrimitive)
Sort the elements of the input
tensor
by value in along a given dimension. Read more§fn q_argsort(
tensor: <B as Backend>::QuantizedTensorPrimitive,
dim: usize,
descending: bool,
) -> <B as Backend>::IntTensorPrimitive
fn q_argsort( tensor: <B as Backend>::QuantizedTensorPrimitive, dim: usize, descending: bool, ) -> <B as Backend>::IntTensorPrimitive
Returns the indices that sort the elements of the input
tensor
by value along a given dimension. Read moreimpl<B, C> Copy for Autodiff<B, C>
Auto Trait Implementations§
impl<B, C> Freeze for Autodiff<B, C>
impl<B, C> RefUnwindSafe for Autodiff<B, C>where
B: RefUnwindSafe,
C: RefUnwindSafe,
impl<B, C> Send for Autodiff<B, C>
impl<B, C> Sync for Autodiff<B, C>
impl<B, C> Unpin for Autodiff<B, C>
impl<B, C> UnwindSafe for Autodiff<B, C>where
B: UnwindSafe,
C: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.