pub struct Float;
Expand description
A type-level representation of the kind of a float tensor
Trait Implementations§
§impl<B> BasicAutodiffOps<B> for Floatwhere
B: AutodiffBackend,
impl<B> BasicAutodiffOps<B> for Floatwhere
B: AutodiffBackend,
§fn inner(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <<Float as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive
fn inner( tensor: <Float as TensorKind<B>>::Primitive, ) -> <<Float as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive
Returns the inner tensor without the autodiff information. Read more
§fn from_inner(
inner: <<Float as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn from_inner( inner: <<Float as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Convert a tensor to the autodiff backend. Read more
§impl<B> BasicOps<B> for Floatwhere
B: Backend,
impl<B> BasicOps<B> for Floatwhere
B: Backend,
§fn empty(
shape: Shape,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive
fn empty( shape: Shape, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive
Creates an empty tensor with the given shape. Read more
§fn shape(tensor: &<Float as TensorKind<B>>::Primitive) -> Shape
fn shape(tensor: &<Float as TensorKind<B>>::Primitive) -> Shape
Returns the shape of the tensor. Read more
§fn reshape(
tensor: <Float as TensorKind<B>>::Primitive,
shape: Shape,
) -> <Float as TensorKind<B>>::Primitive
fn reshape( tensor: <Float as TensorKind<B>>::Primitive, shape: Shape, ) -> <Float as TensorKind<B>>::Primitive
Reshapes the tensor. Read more
§fn transpose(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn transpose( tensor: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Transposes a tensor. Read more
§fn swap_dims(
tensor: <Float as TensorKind<B>>::Primitive,
dim1: usize,
dim2: usize,
) -> <Float as TensorKind<B>>::Primitive
fn swap_dims( tensor: <Float as TensorKind<B>>::Primitive, dim1: usize, dim2: usize, ) -> <Float as TensorKind<B>>::Primitive
Swaps two dimensions of a tensor. Read more
§fn slice(
tensor: <Float as TensorKind<B>>::Primitive,
ranges: &[Range<usize>],
) -> <Float as TensorKind<B>>::Primitive
fn slice( tensor: <Float as TensorKind<B>>::Primitive, ranges: &[Range<usize>], ) -> <Float as TensorKind<B>>::Primitive
Select tensor elements corresponding for the given ranges. Read more
§fn slice_assign(
tensor: <Float as TensorKind<B>>::Primitive,
ranges: &[Range<usize>],
value: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn slice_assign( tensor: <Float as TensorKind<B>>::Primitive, ranges: &[Range<usize>], value: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Assigns the given value to the tensor elements corresponding for the given ranges. Read more
§fn device(
tensor: &<Float as TensorKind<B>>::Primitive,
) -> <B as Backend>::Device
fn device( tensor: &<Float as TensorKind<B>>::Primitive, ) -> <B as Backend>::Device
Returns the device on which the tensor is allocated. Read more
§fn to_device(
tensor: <Float as TensorKind<B>>::Primitive,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive
fn to_device( tensor: <Float as TensorKind<B>>::Primitive, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive
Moves the tensor to the given device. Read more
§async fn into_data_async(
tensor: <Float as TensorKind<B>>::Primitive,
) -> TensorData
async fn into_data_async( tensor: <Float as TensorKind<B>>::Primitive, ) -> TensorData
Extracts the data from the tensor asynchronously. Read more
§fn from_data(
data: TensorData,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive
fn from_data( data: TensorData, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive
Creates a tensor from the given data. Read more
§fn repeat_dim(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
times: usize,
) -> <Float as TensorKind<B>>::Primitive
fn repeat_dim( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, times: usize, ) -> <Float as TensorKind<B>>::Primitive
Repeat the tensor along the given dimension. Read more
§fn cat(
vectors: Vec<<Float as TensorKind<B>>::Primitive>,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive
fn cat( vectors: Vec<<Float as TensorKind<B>>::Primitive>, dim: usize, ) -> <Float as TensorKind<B>>::Primitive
Concatenates the given tensors along the given dimension. Read more
§fn equal(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <B as Backend>::BoolTensorPrimitive
fn equal( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <B as Backend>::BoolTensorPrimitive
Equates the given tensors. Read more
§fn not_equal(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <B as Backend>::BoolTensorPrimitive
fn not_equal( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <B as Backend>::BoolTensorPrimitive
Applies element-wise non-equality comparison between the given tensors. Read more
§fn any(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <B as Backend>::BoolTensorPrimitive
fn any( tensor: <Float as TensorKind<B>>::Primitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the
tensor
evaluates to True. Read more§fn any_dim(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn any_dim( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
Tests if any element in the tensor evaluates to True along a given dimension dim. Read more
§fn all(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <B as Backend>::BoolTensorPrimitive
fn all( tensor: <Float as TensorKind<B>>::Primitive, ) -> <B as Backend>::BoolTensorPrimitive
Tests if all elements in the
tensor
evaluate to True. Read more§fn all_dim(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> <B as Backend>::BoolTensorPrimitive
fn all_dim( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> <B as Backend>::BoolTensorPrimitive
§fn permute(
tensor: <Float as TensorKind<B>>::Primitive,
axes: &[usize],
) -> <Float as TensorKind<B>>::Primitive
fn permute( tensor: <Float as TensorKind<B>>::Primitive, axes: &[usize], ) -> <Float as TensorKind<B>>::Primitive
Permutes the dimensions of a tensor. Read more
§fn expand(
tensor: <Float as TensorKind<B>>::Primitive,
shape: Shape,
) -> <Float as TensorKind<B>>::Primitive
fn expand( tensor: <Float as TensorKind<B>>::Primitive, shape: Shape, ) -> <Float as TensorKind<B>>::Primitive
Broadcasts the given tensor to the specified shape. Read more
§fn flip(
tensor: <Float as TensorKind<B>>::Primitive,
axes: &[usize],
) -> <Float as TensorKind<B>>::Primitive
fn flip( tensor: <Float as TensorKind<B>>::Primitive, axes: &[usize], ) -> <Float as TensorKind<B>>::Primitive
Flips the tensor along the given axes. Read more
§fn chunk(
tensor: <Float as TensorKind<B>>::Primitive,
chunks: usize,
dim: usize,
) -> Vec<<Float as TensorKind<B>>::Primitive>
fn chunk( tensor: <Float as TensorKind<B>>::Primitive, chunks: usize, dim: usize, ) -> Vec<<Float as TensorKind<B>>::Primitive>
Attempts to split the tensor along the given dimension into chunks.
May return less chunks than requested if the tensor size is not divisible by the number of chunks. Read more
§fn elem_type_name() -> &'static str
fn elem_type_name() -> &'static str
Returns the name of the element type.
§impl<B> Numeric<B> for Floatwhere
B: Backend,
impl<B> Numeric<B> for Floatwhere
B: Backend,
§fn add(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn add( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Adds two tensors together. Read more
§fn add_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
fn add_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
Adds a scalar to a tensor element-wise. Read more
§fn sub(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn sub( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Subtracts two tensors. Read more
§fn sub_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
fn sub_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
Subtracts a scalar from a tensor element-wise. Read more
§fn div(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn div( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Divides two tensors. Read more
§fn div_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
fn div_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
Divides a tensor by a scalar element-wise. Read more
§fn remainder_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
fn remainder_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
Computes the modulus element-wise. The result has the same sign as the divisor rhs and its absolute value is
less than that of the divisor. Read more
§fn mul(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn mul( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Multiplies two tensors. Read more
§fn mul_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
fn mul_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
Multiplies a tensor by a scalar element-wise. Read more
§fn neg(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn neg( tensor: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Negates a tensor. Read more
§fn zeros(
shape: Shape,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive
fn zeros( shape: Shape, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive
Creates a tensor filled with zeros. Read more
§fn ones(
shape: Shape,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive
fn ones( shape: Shape, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive
Creates a tensor filled with ones. Read more
§fn full<E>(
shape: Shape,
fill_value: E,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
fn full<E>(
shape: Shape,
fill_value: E,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
Creates a tensor filled with elements equal to the given value. Read more
§fn sum(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn sum( tensor: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Sums all the elements of the tensor. Read more
§fn sum_dim(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive
fn sum_dim( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> <Float as TensorKind<B>>::Primitive
Sums all the elements of the tensor along a dimension. Read more
§fn prod(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn prod( tensor: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Computes the product of all the elements of the tensor. Read more
§fn prod_dim(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive
fn prod_dim( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> <Float as TensorKind<B>>::Primitive
Computes the product of all the elements of the tensor along a dimension. Read more
§fn mean(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn mean( tensor: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Computes the mean of all the elements of the tensor. Read more
§fn mean_dim(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive
fn mean_dim( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> <Float as TensorKind<B>>::Primitive
Computes the mean of all the elements of the tensor along a dimension. Read more
§fn equal_elem(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as BasicOps<B>>::Elem,
) -> <B as Backend>::BoolTensorPrimitive
fn equal_elem( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as BasicOps<B>>::Elem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise equality between two tensors. Read more
§fn not_equal_elem(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as BasicOps<B>>::Elem,
) -> <B as Backend>::BoolTensorPrimitive
fn not_equal_elem( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as BasicOps<B>>::Elem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise non-equality between two tensors. Read more
§fn greater(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <B as Backend>::BoolTensorPrimitive
fn greater( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise greater than comparison between two tensors. Read more
§fn greater_elem(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as BasicOps<B>>::Elem,
) -> <B as Backend>::BoolTensorPrimitive
fn greater_elem( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as BasicOps<B>>::Elem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise greater than comparison between a tensor and a scalar. Read more
§fn greater_equal(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <B as Backend>::BoolTensorPrimitive
fn greater_equal( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise greater than or equal comparison between two tensors. Read more
§fn greater_equal_elem(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as BasicOps<B>>::Elem,
) -> <B as Backend>::BoolTensorPrimitive
fn greater_equal_elem( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as BasicOps<B>>::Elem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise greater than or equal comparison between a tensor and a scalar. Read more
§fn lower(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <B as Backend>::BoolTensorPrimitive
fn lower( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise less than comparison between two tensors. Read more
§fn lower_elem(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as BasicOps<B>>::Elem,
) -> <B as Backend>::BoolTensorPrimitive
fn lower_elem( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as BasicOps<B>>::Elem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise less than comparison between a tensor and a scalar. Read more
§fn lower_equal(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <B as Backend>::BoolTensorPrimitive
fn lower_equal( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise less than or equal comparison between two tensors. Read more
§fn lower_equal_elem(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as BasicOps<B>>::Elem,
) -> <B as Backend>::BoolTensorPrimitive
fn lower_equal_elem( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as BasicOps<B>>::Elem, ) -> <B as Backend>::BoolTensorPrimitive
Element-wise less than or equal comparison between a tensor and a scalar. Read more
§fn mask_where(
tensor: <Float as TensorKind<B>>::Primitive,
mask: <B as Backend>::BoolTensorPrimitive,
source: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn mask_where( tensor: <Float as TensorKind<B>>::Primitive, mask: <B as Backend>::BoolTensorPrimitive, source: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Selects elements from a tensor based on a boolean mask. Read more
§fn mask_fill(
tensor: <Float as TensorKind<B>>::Primitive,
mask: <B as Backend>::BoolTensorPrimitive,
value: <Float as BasicOps<B>>::Elem,
) -> <Float as TensorKind<B>>::Primitive
fn mask_fill( tensor: <Float as TensorKind<B>>::Primitive, mask: <B as Backend>::BoolTensorPrimitive, value: <Float as BasicOps<B>>::Elem, ) -> <Float as TensorKind<B>>::Primitive
Fills elements of a tensor based on a boolean mask. Read more
§fn select(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
indices: Tensor<B, 1, Int>,
) -> <Float as TensorKind<B>>::Primitive
fn select( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, indices: Tensor<B, 1, Int>, ) -> <Float as TensorKind<B>>::Primitive
Select tensor elements along the given dimension corresponding for the given indices. Read more
§fn select_assign(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
indices: Tensor<B, 1, Int>,
values: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn select_assign( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, indices: Tensor<B, 1, Int>, values: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Assign the selected elements along the given dimension corresponding to the given indices
from the value tensor. Read more
§fn gather(
dim: usize,
tensor: <Float as TensorKind<B>>::Primitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <Float as TensorKind<B>>::Primitive
fn gather( dim: usize, tensor: <Float as TensorKind<B>>::Primitive, indices: <B as Backend>::IntTensorPrimitive, ) -> <Float as TensorKind<B>>::Primitive
Gathers elements from a tensor along an axis. Read more
§fn scatter(
dim: usize,
tensor: <Float as TensorKind<B>>::Primitive,
indices: <B as Backend>::IntTensorPrimitive,
values: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn scatter( dim: usize, tensor: <Float as TensorKind<B>>::Primitive, indices: <B as Backend>::IntTensorPrimitive, values: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Scatters elements into a tensor along an axis. Read more
§fn argmax(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn argmax( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the indices of the maximum elements of a tensor along an axis. Read more
§fn argmin(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive
fn argmin( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> <B as Backend>::IntTensorPrimitive
Gets the indices of the minimum elements of a tensor along an axis. Read more
§fn max(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn max( tensor: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Gets the maximum elements of a tensor along an axis. Read more
§fn max_dim(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive
fn max_dim( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> <Float as TensorKind<B>>::Primitive
Gets the maximum elements of a tensor along an axis. Read more
§fn max_dim_with_indices(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> (<Float as TensorKind<B>>::Primitive, <B as Backend>::IntTensorPrimitive)
fn max_dim_with_indices( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> (<Float as TensorKind<B>>::Primitive, <B as Backend>::IntTensorPrimitive)
Gets the maximum elements of a tensor along an axis. Read more
§fn min(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn min( tensor: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Gets the minimum elements of a tensor along an axis. Read more
§fn min_dim(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive
fn min_dim( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> <Float as TensorKind<B>>::Primitive
Gets the minimum elements of a tensor along an axis. Read more
§fn min_dim_with_indices(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
) -> (<Float as TensorKind<B>>::Primitive, <B as Backend>::IntTensorPrimitive)
fn min_dim_with_indices( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, ) -> (<Float as TensorKind<B>>::Primitive, <B as Backend>::IntTensorPrimitive)
Gets the minimum elements and indices of a tensor along an axis. Read more
§fn clamp(
tensor: <Float as TensorKind<B>>::Primitive,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <Float as TensorKind<B>>::Primitive
fn clamp( tensor: <Float as TensorKind<B>>::Primitive, min: <B as Backend>::FloatElem, max: <B as Backend>::FloatElem, ) -> <Float as TensorKind<B>>::Primitive
Clamp the tensor between the given min and max values. Read more
§fn clamp_min(
tensor: <Float as TensorKind<B>>::Primitive,
min: <B as Backend>::FloatElem,
) -> <Float as TensorKind<B>>::Primitive
fn clamp_min( tensor: <Float as TensorKind<B>>::Primitive, min: <B as Backend>::FloatElem, ) -> <Float as TensorKind<B>>::Primitive
Clamps a tensor under a minimum value. Read more
§fn clamp_max(
tensor: <Float as TensorKind<B>>::Primitive,
max: <B as Backend>::FloatElem,
) -> <Float as TensorKind<B>>::Primitive
fn clamp_max( tensor: <Float as TensorKind<B>>::Primitive, max: <B as Backend>::FloatElem, ) -> <Float as TensorKind<B>>::Primitive
Clamps a tensor over a maximum value. Read more
§fn abs(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn abs( tensor: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Calculate absolute value on all elements of a tensor Read more
§fn powf(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn powf( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Element-wise power of a tensor to a float tensor Read more
§fn powf_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
fn powf_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
Element-wise power of a tensor to a scalar float Read more
§fn powi(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn powi( lhs: <Float as TensorKind<B>>::Primitive, rhs: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Element-wise power of a tensor Read more
§fn powi_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
fn powi_scalar<E>(
lhs: <Float as TensorKind<B>>::Primitive,
rhs: E,
) -> <Float as TensorKind<B>>::Primitivewhere
E: ElementConversion,
Element-wise power of a tensor to a scalar int Read more
§fn random(
shape: Shape,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive
fn random( shape: Shape, distribution: Distribution, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive
Create a random tensor. Read more
§fn sign(
tensor: <Float as TensorKind<B>>::Primitive,
) -> <Float as TensorKind<B>>::Primitive
fn sign( tensor: <Float as TensorKind<B>>::Primitive, ) -> <Float as TensorKind<B>>::Primitive
Returns the signs of the elements of a tensor. Read more
§fn sort(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
descending: bool,
) -> <Float as TensorKind<B>>::Primitive
fn sort( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, descending: bool, ) -> <Float as TensorKind<B>>::Primitive
Sort the elements of the input
tensor
by value along a given dimension. Read more§fn sort_with_indices(
tensor: <Float as TensorKind<B>>::Primitive,
dim: usize,
descending: bool,
) -> (<Float as TensorKind<B>>::Primitive, <Int as TensorKind<B>>::Primitive)
fn sort_with_indices( tensor: <Float as TensorKind<B>>::Primitive, dim: usize, descending: bool, ) -> (<Float as TensorKind<B>>::Primitive, <Int as TensorKind<B>>::Primitive)
Sort the elements of the input
tensor
by value along a given dimension. Read more§impl<B> TensorKind<B> for Floatwhere
B: Backend,
impl<B> TensorKind<B> for Floatwhere
B: Backend,
Auto Trait Implementations§
impl Freeze for Float
impl RefUnwindSafe for Float
impl Send for Float
impl Sync for Float
impl Unpin for Float
impl UnwindSafe for Float
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