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<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <<Float as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive<D>
fn inner<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <<Float as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive<D>
Returns the inner tensor without the autodiff information. Read more
§fn from_inner<const D: usize>(
inner: <<Float as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn from_inner<const D: usize>( inner: <<Float as BasicAutodiffOps<B>>::InnerKind as TensorKind<<B as AutodiffBackend>::InnerBackend>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
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<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive<D>
fn empty<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive<D>
Creates an empty tensor with the given shape. Read more
§fn shape<const D: usize>(
tensor: &<Float as TensorKind<B>>::Primitive<D>,
) -> Shape<D>
fn shape<const D: usize>( tensor: &<Float as TensorKind<B>>::Primitive<D>, ) -> Shape<D>
Returns the shape of the tensor. Read more
§fn reshape<const D1: usize, const D2: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D1>,
shape: Shape<D2>,
) -> <Float as TensorKind<B>>::Primitive<D2>
fn reshape<const D1: usize, const D2: usize>( tensor: <Float as TensorKind<B>>::Primitive<D1>, shape: Shape<D2>, ) -> <Float as TensorKind<B>>::Primitive<D2>
Reshapes the tensor. Read more
§fn transpose<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn transpose<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Transposes a tensor. Read more
§fn swap_dims<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim1: usize,
dim2: usize,
) -> <Float as TensorKind<B>>::Primitive<D>
fn swap_dims<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim1: usize, dim2: usize, ) -> <Float as TensorKind<B>>::Primitive<D>
Swaps two dimensions of a tensor. Read more
§fn slice<const D1: usize, const D2: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D1>,
ranges: [Range<usize>; D2],
) -> <Float as TensorKind<B>>::Primitive<D1>
fn slice<const D1: usize, const D2: usize>( tensor: <Float as TensorKind<B>>::Primitive<D1>, ranges: [Range<usize>; D2], ) -> <Float as TensorKind<B>>::Primitive<D1>
Select tensor elements corresponding for the given ranges. Read more
§fn slice_assign<const D1: usize, const D2: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D1>,
ranges: [Range<usize>; D2],
value: <Float as TensorKind<B>>::Primitive<D1>,
) -> <Float as TensorKind<B>>::Primitive<D1>
fn slice_assign<const D1: usize, const D2: usize>( tensor: <Float as TensorKind<B>>::Primitive<D1>, ranges: [Range<usize>; D2], value: <Float as TensorKind<B>>::Primitive<D1>, ) -> <Float as TensorKind<B>>::Primitive<D1>
Assigns the given value to the tensor elements corresponding for the given ranges. Read more
§fn device<const D: usize>(
tensor: &<Float as TensorKind<B>>::Primitive<D>,
) -> <B as Backend>::Device
fn device<const D: usize>( tensor: &<Float as TensorKind<B>>::Primitive<D>, ) -> <B as Backend>::Device
Returns the device on which the tensor is allocated. Read more
§fn to_device<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive<D>
fn to_device<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive<D>
Moves the tensor to the given device. Read more
§async fn into_data_async<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> TensorData
async fn into_data_async<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> TensorData
Extracts the data from the tensor asynchronously. Read more
§fn from_data<const D: usize>(
data: TensorData,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive<D>
fn from_data<const D: usize>( data: TensorData, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive<D>
Creates a tensor from the given data. Read more
§fn repeat_dim<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
times: usize,
) -> <Float as TensorKind<B>>::Primitive<D>
fn repeat_dim<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, times: usize, ) -> <Float as TensorKind<B>>::Primitive<D>
Repeat the tensor along the given dimension. Read more
§fn cat<const D: usize>(
vectors: Vec<<Float as TensorKind<B>>::Primitive<D>>,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive<D>
fn cat<const D: usize>( vectors: Vec<<Float as TensorKind<B>>::Primitive<D>>, dim: usize, ) -> <Float as TensorKind<B>>::Primitive<D>
Concatenates the given tensors along the given dimension. Read more
§fn equal<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, D, Bool>
fn equal<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, D, Bool>
Equates the given tensors. Read more
§fn not_equal<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, D, Bool>
fn not_equal<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, D, Bool>
Applies element-wise non-equality comparison between the given tensors. Read more
§fn any<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, 1, Bool>
fn any<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, 1, Bool>
Tests if any element in the
tensor
evaluates to True. Read more§fn any_dim<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> Tensor<B, D, Bool>
fn any_dim<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> Tensor<B, D, Bool>
Tests if any element in the tensor evaluates to True along a given dimension dim. Read more
§fn all<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, 1, Bool>
fn all<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, 1, Bool>
Tests if all elements in the
tensor
evaluate to True. Read more§fn all_dim<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> Tensor<B, D, Bool>
fn all_dim<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> Tensor<B, D, Bool>
§fn permute<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
axes: [usize; D],
) -> <Float as TensorKind<B>>::Primitive<D>
fn permute<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, axes: [usize; D], ) -> <Float as TensorKind<B>>::Primitive<D>
Permutes the dimensions of a tensor. Read more
§fn expand<const D1: usize, const D2: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D1>,
shape: Shape<D2>,
) -> <Float as TensorKind<B>>::Primitive<D2>
fn expand<const D1: usize, const D2: usize>( tensor: <Float as TensorKind<B>>::Primitive<D1>, shape: Shape<D2>, ) -> <Float as TensorKind<B>>::Primitive<D2>
Broadcasts the given tensor to the specified shape. Read more
§fn flip<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
axes: &[usize],
) -> <Float as TensorKind<B>>::Primitive<D>
fn flip<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, axes: &[usize], ) -> <Float as TensorKind<B>>::Primitive<D>
Flips the tensor along the given axes. 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<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn add<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Adds two tensors together. Read more
§fn add_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
fn add_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
Adds a scalar to a tensor element-wise. Read more
§fn sub<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn sub<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Subtracts two tensors. Read more
§fn sub_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
fn sub_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
Subtracts a scalar from a tensor element-wise. Read more
§fn div<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn div<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Divides two tensors. Read more
§fn div_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
fn div_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
Divides a tensor by a scalar element-wise. Read more
§fn remainder_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
fn remainder_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
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<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn mul<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Multiplies two tensors. Read more
§fn mul_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
fn mul_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
Multiplies a tensor by a scalar element-wise. Read more
§fn neg<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn neg<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Negates a tensor. Read more
§fn zeros<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive<D>
fn zeros<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive<D>
Creates a tensor filled with zeros. Read more
§fn ones<const D: usize>(
shape: Shape<D>,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive<D>
fn ones<const D: usize>( shape: Shape<D>, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive<D>
Creates a tensor filled with ones. Read more
§fn full<const D: usize, E>(
shape: Shape<D>,
fill_value: E,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
fn full<const D: usize, E>(
shape: Shape<D>,
fill_value: E,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
Creates a tensor filled with elements equal to the given value. Read more
§fn sum<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<1>
fn sum<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<1>
Sums all the elements of the tensor. Read more
§fn sum_dim<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive<D>
fn sum_dim<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> <Float as TensorKind<B>>::Primitive<D>
Sums all the elements of the tensor along a dimension. Read more
§fn prod<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<1>
fn prod<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<1>
Computes the product of all the elements of the tensor. Read more
§fn prod_dim<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive<D>
fn prod_dim<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> <Float as TensorKind<B>>::Primitive<D>
Computes the product of all the elements of the tensor along a dimension. Read more
§fn mean<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<1>
fn mean<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<1>
Computes the mean of all the elements of the tensor. Read more
§fn mean_dim<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive<D>
fn mean_dim<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> <Float as TensorKind<B>>::Primitive<D>
Computes the mean of all the elements of the tensor along a dimension. Read more
§fn equal_elem<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as BasicOps<B>>::Elem,
) -> Tensor<B, D, Bool>
fn equal_elem<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as BasicOps<B>>::Elem, ) -> Tensor<B, D, Bool>
Element-wise equality between two tensors. Read more
§fn not_equal_elem<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as BasicOps<B>>::Elem,
) -> Tensor<B, D, Bool>
fn not_equal_elem<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as BasicOps<B>>::Elem, ) -> Tensor<B, D, Bool>
Element-wise non-equality between two tensors. Read more
§fn greater<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, D, Bool>
fn greater<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, D, Bool>
Element-wise greater than comparison between two tensors. Read more
§fn greater_elem<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as BasicOps<B>>::Elem,
) -> Tensor<B, D, Bool>
fn greater_elem<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as BasicOps<B>>::Elem, ) -> Tensor<B, D, Bool>
Element-wise greater than comparison between a tensor and a scalar. Read more
§fn greater_equal<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, D, Bool>
fn greater_equal<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, D, Bool>
Element-wise greater than or equal comparison between two tensors. Read more
§fn greater_equal_elem<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as BasicOps<B>>::Elem,
) -> Tensor<B, D, Bool>
fn greater_equal_elem<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as BasicOps<B>>::Elem, ) -> Tensor<B, D, Bool>
Element-wise greater than or equal comparison between a tensor and a scalar. Read more
§fn lower<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, D, Bool>
fn lower<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, D, Bool>
Element-wise less than comparison between two tensors. Read more
§fn lower_elem<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as BasicOps<B>>::Elem,
) -> Tensor<B, D, Bool>
fn lower_elem<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as BasicOps<B>>::Elem, ) -> Tensor<B, D, Bool>
Element-wise less than comparison between a tensor and a scalar. Read more
§fn lower_equal<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> Tensor<B, D, Bool>
fn lower_equal<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> Tensor<B, D, Bool>
Element-wise less than or equal comparison between two tensors. Read more
§fn lower_equal_elem<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as BasicOps<B>>::Elem,
) -> Tensor<B, D, Bool>
fn lower_equal_elem<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as BasicOps<B>>::Elem, ) -> Tensor<B, D, Bool>
Element-wise less than or equal comparison between a tensor and a scalar. Read more
§fn mask_where<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
mask: Tensor<B, D, Bool>,
source: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn mask_where<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, mask: Tensor<B, D, Bool>, source: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Selects elements from a tensor based on a boolean mask. Read more
§fn mask_fill<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
mask: Tensor<B, D, Bool>,
value: <Float as BasicOps<B>>::Elem,
) -> <Float as TensorKind<B>>::Primitive<D>
fn mask_fill<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, mask: Tensor<B, D, Bool>, value: <Float as BasicOps<B>>::Elem, ) -> <Float as TensorKind<B>>::Primitive<D>
Fills elements of a tensor based on a boolean mask. Read more
§fn select<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
indices: Tensor<B, 1, Int>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn select<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, indices: Tensor<B, 1, Int>, ) -> <Float as TensorKind<B>>::Primitive<D>
Select tensor elements along the given dimension corresponding for the given indices. Read more
§fn select_assign<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
indices: Tensor<B, 1, Int>,
values: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn select_assign<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, indices: Tensor<B, 1, Int>, values: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Assign the selected elements along the given dimension corresponding to the given indices
from the value tensor. Read more
§fn gather<const D: usize>(
dim: usize,
tensor: <Float as TensorKind<B>>::Primitive<D>,
indices: Tensor<B, D, Int>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn gather<const D: usize>( dim: usize, tensor: <Float as TensorKind<B>>::Primitive<D>, indices: Tensor<B, D, Int>, ) -> <Float as TensorKind<B>>::Primitive<D>
Gathers elements from a tensor along an axis. Read more
§fn scatter<const D: usize>(
dim: usize,
tensor: <Float as TensorKind<B>>::Primitive<D>,
indices: Tensor<B, D, Int>,
values: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn scatter<const D: usize>( dim: usize, tensor: <Float as TensorKind<B>>::Primitive<D>, indices: Tensor<B, D, Int>, values: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Scatters elements into a tensor along an axis. Read more
§fn argmax<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn argmax<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
Gets the indices of the maximum elements of a tensor along an axis. Read more
§fn argmin<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> <B as Backend>::IntTensorPrimitive<D>
fn argmin<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> <B as Backend>::IntTensorPrimitive<D>
Gets the indices of the minimum elements of a tensor along an axis. Read more
§fn max<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<1>
fn max<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<1>
Gets the maximum elements of a tensor along an axis. Read more
§fn max_dim<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive<D>
fn max_dim<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> <Float as TensorKind<B>>::Primitive<D>
Gets the maximum elements of a tensor along an axis. Read more
§fn max_dim_with_indices<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> (<Float as TensorKind<B>>::Primitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn max_dim_with_indices<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> (<Float as TensorKind<B>>::Primitive<D>, <B as Backend>::IntTensorPrimitive<D>)
Gets the maximum elements of a tensor along an axis. Read more
§fn min<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<1>
fn min<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<1>
Gets the minimum elements of a tensor along an axis. Read more
§fn min_dim<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> <Float as TensorKind<B>>::Primitive<D>
fn min_dim<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> <Float as TensorKind<B>>::Primitive<D>
Gets the minimum elements of a tensor along an axis. Read more
§fn min_dim_with_indices<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
) -> (<Float as TensorKind<B>>::Primitive<D>, <B as Backend>::IntTensorPrimitive<D>)
fn min_dim_with_indices<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, ) -> (<Float as TensorKind<B>>::Primitive<D>, <B as Backend>::IntTensorPrimitive<D>)
Gets the minimum elements and indices of a tensor along an axis. Read more
§fn clamp<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
min: <B as Backend>::FloatElem,
max: <B as Backend>::FloatElem,
) -> <Float as TensorKind<B>>::Primitive<D>
fn clamp<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, min: <B as Backend>::FloatElem, max: <B as Backend>::FloatElem, ) -> <Float as TensorKind<B>>::Primitive<D>
Clamp the tensor between the given min and max values. Read more
§fn clamp_min<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
min: <B as Backend>::FloatElem,
) -> <Float as TensorKind<B>>::Primitive<D>
fn clamp_min<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, min: <B as Backend>::FloatElem, ) -> <Float as TensorKind<B>>::Primitive<D>
Clamps a tensor under a minimum value. Read more
§fn clamp_max<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
max: <B as Backend>::FloatElem,
) -> <Float as TensorKind<B>>::Primitive<D>
fn clamp_max<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, max: <B as Backend>::FloatElem, ) -> <Float as TensorKind<B>>::Primitive<D>
Clamps a tensor over a maximum value. Read more
§fn abs<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn abs<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Calculate absolute value on all elements of a tensor Read more
§fn powf<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn powf<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Element-wise power of a tensor to a float tensor Read more
§fn powf_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
fn powf_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
Element-wise power of a tensor to a scalar float Read more
§fn powi<const D: usize>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn powi<const D: usize>( lhs: <Float as TensorKind<B>>::Primitive<D>, rhs: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Element-wise power of a tensor Read more
§fn powi_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
fn powi_scalar<const D: usize, E>(
lhs: <Float as TensorKind<B>>::Primitive<D>,
rhs: E,
) -> <Float as TensorKind<B>>::Primitive<D>where
E: ElementConversion,
Element-wise power of a tensor to a scalar int Read more
§fn random<const D: usize>(
shape: Shape<D>,
distribution: Distribution,
device: &<B as Backend>::Device,
) -> <Float as TensorKind<B>>::Primitive<D>
fn random<const D: usize>( shape: Shape<D>, distribution: Distribution, device: &<B as Backend>::Device, ) -> <Float as TensorKind<B>>::Primitive<D>
Create a random tensor. Read more
§fn sign<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
) -> <Float as TensorKind<B>>::Primitive<D>
fn sign<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, ) -> <Float as TensorKind<B>>::Primitive<D>
Returns the signs of the elements of a tensor. Read more
§fn sort<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
descending: bool,
) -> <Float as TensorKind<B>>::Primitive<D>
fn sort<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, descending: bool, ) -> <Float as TensorKind<B>>::Primitive<D>
Sort the elements of the input
tensor
by value along a given dimension. Read more§fn sort_with_indices<const D: usize>(
tensor: <Float as TensorKind<B>>::Primitive<D>,
dim: usize,
descending: bool,
) -> (<Float as TensorKind<B>>::Primitive<D>, <Int as TensorKind<B>>::Primitive<D>)
fn sort_with_indices<const D: usize>( tensor: <Float as TensorKind<B>>::Primitive<D>, dim: usize, descending: bool, ) -> (<Float as TensorKind<B>>::Primitive<D>, <Int as TensorKind<B>>::Primitive<D>)
Sort the elements of the input
tensor
by value along a given dimension. Read moreAuto 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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