class_docstr: BasicBlock V2 from
  `"Identity Mappings in Deep Residual Networks"
  <https://arxiv.org/abs/1603.05027>`_ paper.
  This is used for ResNet V2 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","V2","from","`","``","Identity","Mappings","in","Deep","Residual","Networks","''","<","https",":","\/\/arxiv.org\/abs\/1603.05027",">","`","_","paper",".","This","is","used","for","ResNet","V2","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 forward(self, x):
      residual = x
      x = self.bn1(x)
      x = npx.activation(x, act_type="relu")
      if self.downsample:
          residual = self.downsample(x)
      x = self.conv1(x)
  
      x = self.bn2(x)
      x = npx.activation(x, act_type="relu")
      x = self.conv2(x)
  
      return x + residual
  
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 2 for calling the BasicBlockV2 obj's underlying member method code with example usage: obj.forward(x) and returns: unknown