Function full

Source
pub fn full<T: ElemType>(
    val: T,
    shape: impl Shape,
    device: impl AsDevice,
) -> Tensor
Expand description

Creates a Tensor filled with a specified value.

§Arguments

  • val - The value to fill the Tensor with.
  • shape - The shape of the Tensor.
  • device - The device to place the Tensor on.

§Returns

A Tensor filled with the specified value.