class_docstr: MobileNetV1 model.
class_docstr_tok: ["MobileNetV1","model","."]
docstr: Constructs a MobileNetV1 model.
  
  Args:
    strides: The stride to use the in depthwise convolution in each mobilenet
             block.
    channels: Number of output channels from the pointwise convolution to use
              in each block.
    num_classes: Number of classes.
    use_bn: Whether or not to use batch normalization. Defaults to True. When
            true, biases are not used. When false, biases are used.
    name: Name of the module.
docstr_tok: ["Constructs","a","MobileNetV1","model",".","Args",":","strides",":","The","stride","to","use","the","in","depthwise","convolution","in","each","mobilenet","block",".","channels",":","Number","of","output","channels","from","the","pointwise","convolution","to","use","in","each","block",".","num_classes",":","Number","of","classes",".","use_bn",":","Whether","or","not","to","use","batch","normalization",".","Defaults","to","True",".","When","true",",","biases","are","not","used",".","When","false",",","biases","are","used",".","name",":","Name","of","the","module","."]
code: def __init__(
      self,
      strides: Sequence[int] = (1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1),
      channels: Sequence[int] = (
          64,
          128,
          128,
          256,
          256,
          512,
          512,
          512,
          512,
          512,
          512,
          1024,
          1024,
      ),
      num_classes: int = 1000,
      use_bn: bool = True,
      name: Optional[str] = None,
  ):
      """Constructs a MobileNetV1 model.
  
      Args:
        strides: The stride to use the in depthwise convolution in each mobilenet
                 block.
        channels: Number of output channels from the pointwise convolution to use
                  in each block.
        num_classes: Number of classes.
        use_bn: Whether or not to use batch normalization. Defaults to True. When
                true, biases are not used. When false, biases are used.
        name: Name of the module.
      """
      super().__init__(name=name)
      if len(strides) != len(channels):
          raise ValueError(
              "`strides` and `channels` must have the same length."
          )
  
      self.strides = strides
      self.channels = channels
      self.use_bn = use_bn
      self.with_bias = not use_bn
      self.num_classes = num_classes
  
file_path: dm-haiku/haiku/_src/nets/mobilenetv1.py
imports: from collections.abc import Sequence
  from typing import Optional
  from haiku._src import basic
  from haiku._src import batch_norm
  from haiku._src import conv
  from haiku._src import depthwise_conv
  from haiku._src import module
  from haiku._src import reshape
  import jax
  import jax.numpy
label_desc: Use image node_id 1 to create a new MobileNetV1 object from inherited base classes: hk with example: obj = MobileNetV1(strides, channels, num_classes, use_bn, name)