Struct border_tch_agent::TensorSubBatch
source · pub struct TensorSubBatch { /* private fields */ }Expand description
A buffer consisting of a Tensor.
The internal buffer of this struct has the shape of [n_capacity, shape[1..]],
where shape is obtained from the data pushed at the first time via
TensorSubBatch::push method. [1..] means that the first axis of the
given data is ignored as it might be batch size.
Implementations§
source§impl TensorSubBatch
impl TensorSubBatch
pub fn from_tensor(t: Tensor) -> Self
Trait Implementations§
source§impl Clone for TensorSubBatch
impl Clone for TensorSubBatch
source§impl From<TensorSubBatch> for Tensor
impl From<TensorSubBatch> for Tensor
source§fn from(b: TensorSubBatch) -> Self
fn from(b: TensorSubBatch) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for TensorSubBatch
impl Send for TensorSubBatch
impl !Sync for TensorSubBatch
impl Unpin for TensorSubBatch
impl UnwindSafe for TensorSubBatch
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