Struct burn_tensor::Float
source · pub struct Float;
Trait Implementations§
source§impl<B: Backend> BasicOps<B> for Float
impl<B: Backend> BasicOps<B> for Float
type Elem = <B as Backend>::FloatElem
fn empty<const D: usize>( shape: Shape<D>, device: &B::Device ) -> Self::Primitive<D>
fn shape<const D: usize>(tensor: &Self::Primitive<D>) -> Shape<D>
fn reshape<const D1: usize, const D2: usize>( tensor: Self::Primitive<D1>, shape: Shape<D2> ) -> Self::Primitive<D2>
fn index<const D1: usize, const D2: usize>( tensor: Self::Primitive<D1>, indexes: [Range<usize>; D2] ) -> Self::Primitive<D1>
fn index_assign<const D1: usize, const D2: usize>( tensor: Self::Primitive<D1>, indexes: [Range<usize>; D2], value: Self::Primitive<D1> ) -> Self::Primitive<D1>
fn device<const D: usize>(tensor: &Self::Primitive<D>) -> <B as Backend>::Device
fn to_device<const D: usize>( tensor: Self::Primitive<D>, device: &<B as Backend>::Device ) -> Self::Primitive<D>
fn into_data<const D: usize>(tensor: Self::Primitive<D>) -> Data<Self::Elem, D>
fn from_data<const D: usize>( data: Data<Self::Elem, D>, device: &B::Device ) -> Self::Primitive<D>
fn repeat<const D: usize>( tensor: Self::Primitive<D>, dim: usize, times: usize ) -> Self::Primitive<D>
fn cat<const D: usize>( vectors: Vec<Self::Primitive<D>>, dim: usize ) -> Self::Primitive<D>
fn equal<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> Tensor<B, D, Bool>
fn equal_elem<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Elem ) -> Tensor<B, D, Bool>
fn elem_type_name() -> &'static str
source§impl<B: Backend> Numeric<B> for Float
impl<B: Backend> Numeric<B> for Float
fn add<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> <Float as TensorKind<B>>::Primitive<D>
fn add_scalar<const D: usize, E: ElementConversion>( lhs: Self::Primitive<D>, rhs: E ) -> Self::Primitive<D>
fn sub<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> <Float as TensorKind<B>>::Primitive<D>
fn sub_scalar<const D: usize, E: ElementConversion>( lhs: Self::Primitive<D>, rhs: E ) -> Self::Primitive<D>
fn div<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> <Float as TensorKind<B>>::Primitive<D>
fn div_scalar<const D: usize, E: ElementConversion>( lhs: Self::Primitive<D>, rhs: E ) -> Self::Primitive<D>
fn mul<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> <Float as TensorKind<B>>::Primitive<D>
fn mul_scalar<const D: usize, E: ElementConversion>( lhs: Self::Primitive<D>, rhs: E ) -> Self::Primitive<D>
fn neg<const D: usize>(tensor: Self::Primitive<D>) -> Self::Primitive<D>
fn zeros<const D: usize>( shape: Shape<D>, device: &B::Device ) -> Self::Primitive<D>
fn ones<const D: usize>( shape: Shape<D>, device: &B::Device ) -> Self::Primitive<D>
fn sum<const D: usize>(tensor: Self::Primitive<D>) -> Self::Primitive<1>
fn sum_dim<const D: usize>( tensor: Self::Primitive<D>, dim: usize ) -> Self::Primitive<D>
fn mean<const D: usize>(tensor: Self::Primitive<D>) -> Self::Primitive<1>
fn mean_dim<const D: usize>( tensor: Self::Primitive<D>, dim: usize ) -> Self::Primitive<D>
fn greater<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> Tensor<B, D, Bool>
fn greater_elem<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Elem ) -> Tensor<B, D, Bool>
fn greater_equal<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> Tensor<B, D, Bool>
fn greater_equal_elem<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Elem ) -> Tensor<B, D, Bool>
fn lower<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> Tensor<B, D, Bool>
fn lower_elem<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Elem ) -> Tensor<B, D, Bool>
fn lower_equal<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> Tensor<B, D, Bool>
fn lower_equal_elem<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Elem ) -> Tensor<B, D, Bool>
fn mask_scatter<const D: usize>( tensor: Self::Primitive<D>, mask: Tensor<B, D, Bool>, source: Self::Primitive<D> ) -> Self::Primitive<D>
fn mask_fill<const D: usize>( tensor: Self::Primitive<D>, mask: Tensor<B, D, Bool>, value: Self::Elem ) -> Self::Primitive<D>
fn index_select_dim<const D: usize>( tensor: Self::Primitive<D>, dim: usize, indexes: Tensor<B, 1, Int> ) -> Self::Primitive<D>
fn index_select_dim_assign<const D1: usize, const D2: usize>( tensor: Self::Primitive<D1>, dim: usize, indexes: Tensor<B, 1, Int>, values: Self::Primitive<D2> ) -> Self::Primitive<D1>
fn index_select<const D: usize>( tensor: Self::Primitive<D>, indexes: Tensor<B, D, Int> ) -> Self::Primitive<D>
fn index_select_assign<const D: usize>( tensor: Self::Primitive<D>, indexes: Tensor<B, D, Int>, values: Self::Primitive<D> ) -> Self::Primitive<D>
Auto Trait Implementations§
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