@available(*, deprecated, message: "Datasets will be removed in S4TF v0.10. Please use the new Batches API instead.")
@frozen
public struct Dataset<Element> where Element : TensorGroup
extension Dataset: Sequence
Represents a potentially large set of elements.
A Dataset
can be used to represent an input pipeline as a collection of element tensors.
-
Declaration
public init(_handle: VariantHandle)
-
Declaration
public init(randomSeed: Int64)
-
Creates a dataset from a batch of elements as a tensor.
Declaration
public init(elements: Element)
-
Declaration
public typealias Iterator = DatasetIterator<Element>
-
Returns an iterator over the elements of this dataset.
Declaration
public func makeIterator() -> DatasetIterator<Element>
-
Declaration
public func map<ResultElement: TensorGroup>( _ transform: (Element) -> ResultElement ) -> Dataset<ResultElement>
-
Declaration
public func map<ResultElement: TensorGroup>( parallelCallCount: Int, _ transform: (Element) -> ResultElement ) -> Dataset<ResultElement>
-
Declaration
public func filter(_ isIncluded: (Element) -> Tensor<Bool>) -> Dataset
-
Declaration
public func prefetched(count: Int) -> Dataset
-
Declaration
public func shuffled( sampleCount: Int, randomSeed: Int64, reshuffleForEachIterator: Bool = true ) -> Dataset
-
Declaration
public func batched(_ batchSize: Int) -> Dataset
-
Declaration
public func repeated(count: Int? = nil) -> Dataset