class_docstr: Convolutional 2D subsampling (to 1/4 length).
  
  :param int idim: input dim
  :param int odim: output dim
  :param flaot dropout_rate: dropout rate
class_docstr_tok: ["Convolutional","2D","subsampling","(","to","1\/4","length",")",".",":","param","int","idim",":","input","dim",":","param","int","odim",":","output","dim",":","param","flaot","dropout_rate",":","dropout","rate"]
docstr: Initialize Conv2dSubsampling.
docstr_tok: ["Initialize","Conv2dSubsampling","."]
code: def __init__(
      self,
      channels,
      idim,
      dims,
      dropout=0.1,
      initialW=None,
      initial_bias=None,
  ):
      """Initialize Conv2dSubsampling."""
      super(Conv2dSubsampling, self).__init__()
      self.dropout = dropout
      with self.init_scope():
          # Standard deviation for Conv2D with 1 channel and kernel 3 x 3.
          n = 1 * 3 * 3
          stvd = 1.0 / np.sqrt(n)
          self.conv1 = L.Convolution2D(
              1,
              channels,
              3,
              stride=2,
              pad=1,
              initialW=initialW(scale=stvd),
              initial_bias=initial_bias(scale=stvd),
          )
          n = channels * 3 * 3
          stvd = 1.0 / np.sqrt(n)
          self.conv2 = L.Convolution2D(
              channels,
              channels,
              3,
              stride=2,
              pad=1,
              initialW=initialW(scale=stvd),
              initial_bias=initial_bias(scale=stvd),
          )
          stvd = 1.0 / np.sqrt(dims)
          self.out = L.Linear(
              idim,
              dims,
              initialW=initialW(scale=stvd),
              initial_bias=initial_bias(scale=stvd),
          )
          self.pe = PositionalEncoding(dims, dropout)
  
file_path: espnet/espnet/nets/chainer_backend/transformer/subsampling.py
imports: import logging
  import chainer
  import chainer.functions
  import chainer.links
  import numpy
  from espnet.nets.chainer_backend.transformer.embedding import PositionalEncoding
label_desc: Use image node_id 1 to create a new Conv2dSubsampling object from inherited base classes: chainer with example: obj = Conv2dSubsampling(channels, idim, dims, dropout, initialW, initial_bias)