build method

  1. @override
void build(
  1. Tensor input
)
override

Initializes the layer's parameters based on the shape of the first input.

Subclasses should override this method to create their weights and biases. This method is called automatically by call and should not be called directly.

Implementation

@override
void build(Tensor<dynamic> input) {
  Matrix inputMatrix = input.value as Matrix;
  inputHeight = inputMatrix.length;
  inputWidth = inputMatrix[0].length;
  super.build(input);
}