docstr: Calculates and stores `outh` and `outw`.
docstr_tok: ["Calculates","and","stores","`","outh","`","and","`","outw","`","."]
code: def _calc_out_size(self, x_shape, w_shape):
      """Calculates and stores `outh` and `outw`."""
      _, _, kh, kw = w_shape
      _, _, in_h, in_w = x_shape
  
      # - k, m, n: shape of out_channel
      # - b: number of inputs
      # - h, w: height and width of kernels
      # k, m, n, b, h, w -> b, k, m, n, h, w
      if self.outh is None:
          self.outh = conv.get_deconv_outsize(
              in_h, kh, self.sy, self.ph, d=self.dy
          )
          if self.outh <= 0:
              raise RuntimeError(
                  "Height in the output must be positive."
              )
  
      if self.outw is None:
          self.outw = conv.get_deconv_outsize(
              in_w, kw, self.sx, self.pw, d=self.dx
          )
          if self.outw <= 0:
              raise RuntimeError(
                  "Width in the output must be positive."
              )
  
imports: import numpy
  import chainer
  from chainer.backends import cuda
  from chainer.backends import intel64
  from chainer import configuration
  from chainer import function_node
  import chainer.functions
  from chainer.functions.connection import convolution_2d
  from chainer import memory_layouts
  from chainer.utils import argument
  from chainer.utils import conv
  from chainer.utils import type_check
  import chainerx
label_desc: Use image node_id 4 for calling the Deconvolution2DFunction obj's underlying member method code with example usage: obj._calc_out_size(x_shape, w_shape) without return types