Linear constructor

Linear(
  1. int inFeatures,
  2. int outFeatures, {
  3. Tensor2D? weight,
  4. Float64List? bias,
  5. int seed = 123,
})

Implementation

Linear(this.inFeatures, this.outFeatures,
    {Tensor2D? weight, Float64List? bias, int seed = 123})
    : w = weight ?? _xavier(inFeatures, outFeatures, seed: seed),
      b = bias ?? Float64List(outFeatures) {
  assert(inFeatures > 0 && outFeatures > 0);
}