to_layout

Function to_layout 

Source
pub fn to_layout<R, T, D, B, D2>(
    tensor: &TensorBase<Storage<R, T, B>, D>,
    layout: Layout<D2>,
) -> TensorBase<Storage<DataCow<'_, <B as DeviceRawAPI<T>>::Raw>, T, B>, D2>
where R: DataAPI<Data = <B as DeviceRawAPI<T>>::Raw>, D: DimAPI, D2: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T> + OpAssignArbitaryAPI<T, D2, D>,
Expand description

Convert tensor to the other layout.