Google I/O returns May 18-20! Reserve space and build your schedule Register now

TensorFlowScalar

public protocol TensorFlowScalar : _TensorFlowDataTypeCompatible
  • makeTensor(rank:on:)

    Extension method

    Convert to a tensor with the specified rank, with all dimensions equal to 1.

    Declaration

    public func makeTensor(rank: Int, on device: Device = .default) -> Tensor<Self>
  • init(_:)

    Extension method

    Declaration

    public init?(_ tensor: Tensor<Self>)