View Source Evision.Backend (Evision v0.1.21)

Link to this section Summary

Functions

Tensor with constant values.

Link to this section Functions

Link to this function

constant(out, scalar, backend_options)

View Source
@spec constant(Nx.Tensor.t(), number(), any()) :: Nx.Tensor.t()
@spec constant(Nx.Tensor.t(), number(), any()) :: Nx.Tensor.t()

Tensor with constant values.

example

Example

Nx.tensor(1.0, backend: Evision.Backend)
#Nx.Tensor<
  f32
  Evision.Backend
  1.0
>