fitAsync method

Future<void> fitAsync(
  1. List<List<double>> X,
  2. List<List<double>> Y, {
  3. int? batchSize,
  4. bool verbose = false,
  5. String optimizer = 'sgd',
  6. double momentum = 0.9,
  7. double beta1 = 0.9,
  8. double beta2 = 0.999,
  9. double epsilon = 1e-8,
  10. double l2 = 0.0,
  11. String lrSchedule = 'constant',
  12. int stepSize = 10,
  13. double stepDecay = 0.5,
  14. double expDecay = 0.99,
})

Asynchronous wrapper that runs fit in a Future (not in a separate isolate).

Implementation

Future<void> fitAsync(
  List<List<double>> X,
  List<List<double>> Y, {
  int? batchSize,
  bool verbose = false,
  String optimizer = 'sgd',
  double momentum = 0.9,
  double beta1 = 0.9,
  double beta2 = 0.999,
  double epsilon = 1e-8,
  double l2 = 0.0,
  String lrSchedule = 'constant',
  int stepSize = 10,
  double stepDecay = 0.5,
  double expDecay = 0.99,
}) {
  return Future(
    () => fit(
      X,
      Y,
      batchSize: batchSize,
      verbose: verbose,
      optimizer: optimizer,
      momentum: momentum,
      beta1: beta1,
      beta2: beta2,
      epsilon: epsilon,
      l2: l2,
      lrSchedule: lrSchedule,
      stepSize: stepSize,
      stepDecay: stepDecay,
      expDecay: expDecay,
    ),
  );
}