Registration is open for TensorFlow Dev Summit 2020 Learn more

StringTensor

@frozen
public struct StringTensor
extension StringTensor: TensorGroup

StringTensor is a multi-dimensional array whose elements are Strings.

  • The underlying TensorHandle.

    Note

    handle is public to allow user defined ops, but should not normally be used otherwise.

    Declaration

    public let handle: TensorHandle<String>
  • Declaration

    public init(handle: TensorHandle<String>)
  • Computes self == other element-wise.

    Note

    elementsEqual supports broadcasting.

    Declaration

    func elementsEqual(_ other: StringTensor) -> Tensor<Bool>
  • Declaration

    init(shape: TensorShape, scalars: [String])
  • Creates a 0-D StringTensor from a scalar value.

    Declaration

    init(_ value: String)
  • Creates a 1-D StringTensor in from contiguous scalars.

    Declaration

    init(_ scalars: [String])
  • Declaration

    var array: ShapedArray<String> { get }
  • Declaration

    var scalars: [String] { get }
  • Declaration

    public init(_owning tensorHandles: UnsafePointer<CTensorHandle>?)
  • Declaration

    public init<C: RandomAccessCollection>(
        _handles: C
    ) where C.Element: _AnyTensorHandle