pub struct TensorBatch { /* 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
TensorBatch::push method. [1..] means that the first axis of the
given data is ignored as it might be batch size.
Implementations§
Source§impl TensorBatch
impl TensorBatch
pub fn from_tensor(t: Tensor) -> Self
Trait Implementations§
Source§impl BatchBase for TensorBatch
impl BatchBase for TensorBatch
Source§impl Clone for TensorBatch
impl Clone for TensorBatch
Source§impl From<TensorBatch> for Tensor
impl From<TensorBatch> for Tensor
Source§fn from(b: TensorBatch) -> Self
fn from(b: TensorBatch) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TensorBatch
impl RefUnwindSafe for TensorBatch
impl Send for TensorBatch
impl !Sync for TensorBatch
impl Unpin for TensorBatch
impl UnwindSafe for TensorBatch
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