class_docstr: Create a linear classifier with pooling
class_docstr_tok: ["Create","a","linear","classifier","with","pooling"]
code: def __init__(
      self,
      dims: list,  # List of hidden sizes for MLP as `int`s
      ps: list,  # List of dropout probabilities as `float`s
      bptt: int,  # Backpropagation through time
      y_range: tuple = None,  # Tuple of (low, high) output value bounds
  ):
      if len(ps) != len(dims) - 1:
          raise ValueError(
              "Number of layers and dropout values do not match."
          )
      acts = [nn.ReLU(inplace=True)] * (len(dims) - 2) + [None]
      layers = [
          LinBnDrop(i, o, p=p, act=a)
          for i, o, p, a in zip(dims[:-1], dims[1:], ps, acts)
      ]
      if y_range is not None:
          layers.append(SigmoidRange(*y_range))
      self.layers = nn.Sequential(*layers)
      self.bptt = bptt
  
imports: from __future__ import annotations
  from ...data.all import *
  from ..core import *
  from .awdlstm import *
label_desc: Use image node_id 1 to create a new PoolingLinearClassifier object from inherited base classes: Module with example: obj = PoolingLinearClassifier(dims, ps, bptt, y_range)