トレーニングエポック

public final class TrainingEpochs<
  Samples: Collection,
  Entropy: RandomNumberGenerator
>: Sequence, IteratorProtocol

サンプルが均一である場合に DNN をトレーニングするのに適したバッチ サンプルのコレクションの無限シーケンス。

各エポックのバッチはすべてまったく同じサイズです。

  • samplesからサイズbatchSizeのバッチにサンプルを描画するインスタンスを作成します。

    宣言

    public init(
      samples: Samples,
      batchSize: Int,
      entropy: Entropy
    )

    パラメーター

    entropy

    サンプルの順序をシャッフルするために使用されるランダム性のソース。これはselfに格納されるため、それが擬似乱数のみで値セマンティクスを持つ場合、エポックのシーケンスは決定的であり、他の操作に依存しません。

  • 各エポックのタイプ、サンプルのバッチのコレクション。

    宣言

    public typealias Element = Slices<
      Sampling<Samples, Array<Samples.Index>.SubSequence>
    >
  • 順番に次のエポックを返します。

    宣言

    public func next() -> Element?
`Entropy` == `SystemRandomNumberGenerator` の場合に利用可能
  • samplesからサイズbatchSizeのバッチにサンプルを描画するインスタンスを作成します。

    宣言

    public convenience init(
      samples: Samples,
      batchSize: Int
    )