NSImage

public extension NSImage
  • Creates a NSImage from the given tensor

    Declaration

    Swift

    convenience init?<Element, Device>(_ tensor: Tensor<Element, Device>, tensorRange: ClosedRange<Element> = 0 ... 1) where Element : NumericType, Device : DeviceType

    Parameters

    tensor

    Tensor

    tensorRange

    Range to normalize pixel values to