Function leaf::util::write_batch_sample
[−]
[src]
pub fn write_batch_sample<T: NumCast + Copy>(tensor: &mut SharedTensor<f32>, data: &[T], i: usize)
Write the i
th sample of a batch into a SharedTensor.
The size of a single sample is infered through the first dimension of the SharedTensor, which is asumed to be the batchsize.
Allocates memory on a Native Backend if neccessary.