public struct Dataset<Element> where Element : TensorGroup

Represents a potentially large set of elements.

A Dataset can be used to represent an input pipeline as a collection of element tensors.

  • Creates a dataset from a batch of elements as a tensor.

    Declaration

    init(elements: Element)
  • Declaration

    func map<ResultElement : TensorGroup>(
      _ transform: (Element) -> ResultElement
    ) -> Dataset<ResultElement>
  • Declaration

    func filter(
      _ isIncluded: (Element) -> Tensor<Bool>
    ) -> Dataset