Skip to main content

create_view

Function create_view 

Source
pub fn create_view(
    source: impl IntoArg<Tensor>,
    shape: &[i64],
    dtype: DLDataType,
    relative_byte_offset: u64,
) -> Result<Tensor>
Expand description

Create a view of the storage of source, relative_byte_offset bytes past its data, with another shape and data type (runtime.TensorCreateView).

ยงErrors

Returns an error if source is not contiguous or the view does not fit in its storage.