build method
Records the input dimensions, which are needed for the backward pass.
Implementation
@override
void build(Tensor<dynamic> input) {
Matrix inputMatrix = input.value as Matrix;
inputRows = inputMatrix.length;
inputCols = inputMatrix[0].length;
super.build(input);
}