Struct burn_tensor::Bool
source · pub struct Bool;
Expand description
A type-level representation of the kind of a bool tensor.
Trait Implementations§
source§impl<B: Backend> BasicOps<B> for Bool
impl<B: Backend> BasicOps<B> for Bool
source§fn empty<const D: usize>(
shape: Shape<D>,
device: &B::Device
) -> Self::Primitive<D>
fn empty<const D: usize>( shape: Shape<D>, device: &B::Device ) -> Self::Primitive<D>
Creates an empty tensor with the given shape. Read more
source§fn shape<const D: usize>(tensor: &Self::Primitive<D>) -> Shape<D>
fn shape<const D: usize>(tensor: &Self::Primitive<D>) -> Shape<D>
Returns the shape of the tensor. Read more
source§fn reshape<const D1: usize, const D2: usize>(
tensor: Self::Primitive<D1>,
shape: Shape<D2>
) -> Self::Primitive<D2>
fn reshape<const D1: usize, const D2: usize>( tensor: Self::Primitive<D1>, shape: Shape<D2> ) -> Self::Primitive<D2>
Reshapes the tensor. Read more
source§fn slice<const D1: usize, const D2: usize>(
tensor: Self::Primitive<D1>,
ranges: [Range<usize>; D2]
) -> Self::Primitive<D1>
fn slice<const D1: usize, const D2: usize>( tensor: Self::Primitive<D1>, ranges: [Range<usize>; D2] ) -> Self::Primitive<D1>
Select tensor elements corresponding for the given ranges. Read more
source§fn slice_assign<const D1: usize, const D2: usize>(
tensor: Self::Primitive<D1>,
ranges: [Range<usize>; D2],
value: Self::Primitive<D1>
) -> Self::Primitive<D1>
fn slice_assign<const D1: usize, const D2: usize>( tensor: Self::Primitive<D1>, ranges: [Range<usize>; D2], value: Self::Primitive<D1> ) -> Self::Primitive<D1>
Assigns the given value to the tensor elements corresponding for the given ranges. Read more
source§fn device<const D: usize>(tensor: &Self::Primitive<D>) -> <B as Backend>::Device
fn device<const D: usize>(tensor: &Self::Primitive<D>) -> <B as Backend>::Device
Returns the device on which the tensor is allocated. Read more
source§fn to_device<const D: usize>(
tensor: Self::Primitive<D>,
device: &<B as Backend>::Device
) -> Self::Primitive<D>
fn to_device<const D: usize>( tensor: Self::Primitive<D>, device: &<B as Backend>::Device ) -> Self::Primitive<D>
Moves the tensor to the given device. Read more
source§fn into_data<const D: usize>(tensor: Self::Primitive<D>) -> Data<Self::Elem, D>
fn into_data<const D: usize>(tensor: Self::Primitive<D>) -> Data<Self::Elem, D>
Extracts the data from the tensor. Read more
source§fn from_data<const D: usize>(
data: Data<Self::Elem, D>,
device: &B::Device
) -> Self::Primitive<D>
fn from_data<const D: usize>( data: Data<Self::Elem, D>, device: &B::Device ) -> Self::Primitive<D>
Creates a tensor from the given data. Read more
source§fn repeat<const D: usize>(
tensor: Self::Primitive<D>,
dim: usize,
times: usize
) -> Self::Primitive<D>
fn repeat<const D: usize>( tensor: Self::Primitive<D>, dim: usize, times: usize ) -> Self::Primitive<D>
Repeat the tensor along the given dimension. Read more
source§fn equal<const D: usize>(
lhs: Self::Primitive<D>,
rhs: Self::Primitive<D>
) -> Tensor<B, D, Bool>
fn equal<const D: usize>( lhs: Self::Primitive<D>, rhs: Self::Primitive<D> ) -> Tensor<B, D, Bool>
Equates the given tensors. Read more
source§fn cat<const D: usize>(
vectors: Vec<Self::Primitive<D>>,
dim: usize
) -> Self::Primitive<D>
fn cat<const D: usize>( vectors: Vec<Self::Primitive<D>>, dim: usize ) -> Self::Primitive<D>
Concatenates the given tensors along the given dimension. Read more
source§fn elem_type_name() -> &'static str
fn elem_type_name() -> &'static str
Returns the name of the element type.
Auto Trait Implementations§
impl RefUnwindSafe for Bool
impl Send for Bool
impl Sync for Bool
impl Unpin for Bool
impl UnwindSafe for Bool
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