I have a multi dimensional array as below.
let mut my_array = [[[0f32; 15]; 15]; 4];
pub fn with_values(self, value: &[T]) -> Result<Self>
I dislike the inefficient approach to copy the element one by one. Perhaps it is better to take use
memcpy internally. The multi-dimensional array is a continuous area of memory. The dimensions do not change the memory layout if I am correct.
let state_tensor = Tensor::<f32>::new(&[1, 4, 15, 15]).with_values(...);
Is there a way to efficiently initialize tensor using the multi dimensional array?