class_docstr: Block for MobileNetV1.
class_docstr_tok: ["Block","for","MobileNetV1","."]
code: def __call__(self, inputs: jax.Array, is_training: bool) -> jax.Array:
      depthwise = hk.DepthwiseConv2D(
          channel_multiplier=1,
          kernel_shape=3,
          stride=self.stride,
          padding=((1, 1), (1, 1)),
          with_bias=self.with_bias,
          name="depthwise_conv",
      )
  
      pointwise = hk.Conv2D(
          output_channels=self.channels,
          kernel_shape=(1, 1),
          stride=1,
          padding="VALID",
          with_bias=self.with_bias,
          name="pointwise_conv",
      )
  
      out = depthwise(inputs)
      if self.use_bn:
          bn1 = hk.BatchNorm(
              create_scale=True, create_offset=True, decay_rate=0.999
          )
          out = bn1(out, is_training)
      out = jax.nn.relu(out)
      out = pointwise(out)
      if self.use_bn:
          bn2 = hk.BatchNorm(
              create_scale=True, create_offset=True, decay_rate=0.999
          )
          out = bn2(out, is_training)
      out = jax.nn.relu(out)
      return out
  
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 2 for calling the MobileNetV1Block obj's underlying member method code with example usage: obj.__call__(inputs, is_training) and returns: out