class_docstr: BasicBlock V1 from `"Deep Residual Learning for Image Recognition"
  <http://arxiv.org/abs/1512.03385>`_ paper.
  This is used for ResNet V1 for 18, 34 layers.
  
  Parameters
  ----------
  channels : int
      Number of output channels.
  stride : int
      Stride size.
  downsample : bool, default False
      Whether to downsample the input.
  in_channels : int, default 0
      Number of input channels. Default is 0, to infer from the graph.
class_docstr_tok: ["BasicBlock","V1","from","`","``","Deep","Residual","Learning","for","Image","Recognition","''","<","http",":","\/\/arxiv.org\/abs\/1512.03385",">","`","_","paper",".","This","is","used","for","ResNet","V1","for","18",",","34","layers",".","Parameters","--","--","--","--","--","channels",":","int","Number","of","output","channels",".","stride",":","int","Stride","size",".","downsample",":","bool",",","default","False","Whether","to","downsample","the","input",".","in_channels",":","int",",","default","0","Number","of","input","channels",".","Default","is","0",",","to","infer","from","the","graph","."]
code: def __init__(
      self, channels, stride, downsample=False, in_channels=0, **kwargs
  ):
      super(BasicBlockV1, self).__init__(**kwargs)
      self.body = nn.HybridSequential()
      self.body.add(_conv3x3(channels, stride, in_channels))
      self.body.add(nn.BatchNorm())
      self.body.add(nn.Activation("relu"))
      self.body.add(_conv3x3(channels, 1, channels))
      self.body.add(nn.BatchNorm())
      if downsample:
          self.downsample = nn.HybridSequential()
          self.downsample.add(
              nn.Conv2D(
                  channels,
                  kernel_size=1,
                  strides=stride,
                  use_bias=False,
                  in_channels=in_channels,
              )
          )
          self.downsample.add(nn.BatchNorm())
      else:
          self.downsample = None
  
imports: import os
  from ....device import cpu
  from ...block import HybridBlock
  from ...None import nn
  from ....None import base
  from ....util import use_np, wrap_ctx_to_device_func
  from ....None import npx
label_desc: Use image node_id 1 to create a new BasicBlockV1 object from inherited base classes: HybridBlock with example: obj = BasicBlockV1(channels, stride, downsample, in_channels)