class_docstr: Multi-layer Perceptron.
  
  The `_forward` method propagates input forward through the network and stores the outputs
  of each layer along the way. The `_backward` method then goes through each layer in reverse
  order and updates the weights within each layer.
docstr: Return the number of layers in the network.
  
  The number of layers is equal to the number of hidden layers plus 2. The 2 accounts for the
  input layer and the output layer.
docstr_tok: ["Return","the","number","of","layers","in","the","network",".","The","number","of","layers","is","equal","to","the","number","of","hidden","layers","plus","2",".","The","2","accounts","for","the","input","layer","and","the","output","layer","."]
code: def n_layers(self) -> int:
      """Return the number of layers in the network.
  
      The number of layers is equal to the number of hidden layers plus 2. The 2 accounts for the
      input layer and the output layer.
  
      """
      return len(self.hidden_dims) + 2
  
imports: from __future__ import annotations
  import collections
  import copy
  import functools
  import numpy
  import pandas
  from river import base, optim
label_desc: Use image node_id 2 for calling the MLP obj's underlying member method code with example usage: obj.n_layers() and returns: unknown