trainAsync

fun trainAsync(epochDataProvider: Supplier<Iterator<Pair<Tensor<*, *>, Tensor<*, *>>>>, epochs: Int): CompletableFuture<TrainingResult>(source)

Train asynchronously using virtual threads.

Return

A CompletableFuture that completes with the training result.

Parameters

epochDataProvider

Function that returns an Iterator of (x, y) tensor pairs.

epochs

Number of training epochs.