class_docstr: Tensorflow compatible Convolution2D
  
  This is a Convolution2D chain that imitates Tensorflow's tf.nn.conv2d.
  
  The arguments are the same as that of
  :class:`chainer.links.Convolution2D` except for `pad`.
  :obj:`pad` can be set TF's "SAME" or "VALID" in addition to integer value.
  If integer value is set,
  this chain is equal to :class:`chainer.links.Convolution2D`.
class_docstr_tok: ["Tensorflow","compatible","Convolution2D","This","is","a","Convolution2D","chain","that","imitates","Tensorflow","'s","tf.nn.conv2d",".","The","arguments","are","the","same","as","that","of",":","class",":","`","chainer.links.Convolution2D","`","except","for","`","pad","`",".",":","obj",":","`","pad","`","can","be","set","TF","'s","``","SAME","''","or","``","VALID","''","in","addition","to","integer","value",".","If","integer","value","is","set",",","this","chain","is","equal","to",":","class",":","`","chainer.links.Convolution2D","`","."]
code: def __init__(
      self,
      in_channels,
      out_channels,
      ksize=None,
      stride=1,
      pad="SAME",
      nobias=False,
      initialW=None,
      initial_bias=None,
      **kwargs,
  ):
      super(TFConvolution2D, self).__init__()
      if ksize is None:
          out_channels, ksize, in_channels = (
              in_channels,
              out_channels,
              None,
          )
  
      if pad in ("SAME", "VALID"):  # TF compatible pad
          self.padding = lambda x: _tf_padding(
              x, _pair(self.conv.ksize), _pair(self.conv.stride), pad
          )
          conv_pad = 0
      else:
          self.padding = None
          assert isinstance(pad, int)
          conv_pad = pad
  
      with self.init_scope():
          self.conv = Convolution2D(
              in_channels,
              out_channels,
              ksize,
              stride,
              conv_pad,
              nobias,
              initialW,
              initial_bias,
              **kwargs,
          )
  
file_path: chainercv/chainercv/links/model/mobilenet/tf_convolution_2d.py
imports: import numpy
  import chainer
  from chainer.functions import pad
  from chainer.links import Convolution2D
  from chainer.utils import conv
label_desc: Use image node_id 1 to create a new TFConvolution2D object from inherited base classes: chainer with example: obj = TFConvolution2D(in_channels, out_channels, ksize, stride, pad, nobias, initialW, initial_bias)