Linear constructor
Linear(
- int inFeatures,
- int outFeatures, {
- Tensor2D? weight,
- Float64List? bias,
- 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);
}