class_docstr: Gradient wrt. filters for `Corr3dMM`.
  
  Notes
  -----
  You will not want to use this directly, but rely on
  Theano's automatic differentiation or graph optimization to
  use it as needed.
class_docstr_tok: ["Gradient","wrt",".","filters","for","`","Corr3dMM","`",".","Notes","--","--","-","You","will","not","want","to","use","this","directly",",","but","rely","on","Theano","'s","automatic","differentiation","or","graph","optimization","to","use","it","as","needed","."]
code: def infer_shape(self, node, input_shape):
      if self.border_mode == "half":
          padH = padW = padD = -1
      elif self.border_mode == "full":
          padH = padW = padD = -2
      elif isinstance(self.border_mode, tuple):
          padH, padW, padD = self.border_mode
      else:
          assert self.border_mode == "valid"
          padH = padW = padD = 0
      dH, dW, dD = self.subsample
      imshp = input_shape[0]
      topshp = input_shape[1]
      ssize, imshp = imshp[1], list(imshp[2:])
      ssize = ssize // self.num_groups
      nkern, topshp = topshp[1], list(topshp[2:])
      height_width_depth = node.inputs[-3:]
      if (dH != 1) or (padH == -1):
          # vertical subsampling or half padding, kernel height is specified
          kH = height_width_depth[0]
      elif padH == -2:
          # vertical full padding, we can infer the kernel height
          kH = 2 - imshp[0] + (topshp[0] - 1) * dH
      else:
          # explicit padding, we can infer the kernel height
          kH = imshp[0] + 2 * padH - (topshp[0] - 1) * dH
      if (dW != 1) or (padW == -1):
          kW = height_width_depth[1]
      elif padW == -2:
          kW = 2 - imshp[1] + (topshp[1] - 1) * dW
      else:
          kW = imshp[1] + 2 * padW - (topshp[1] - 1) * dW
      if (dD != 1) or (padD == -1):
          kD = height_width_depth[2]
      elif padD == -2:
          kD = 2 - imshp[2] + (topshp[2] - 1) * dD
      else:
          kD = imshp[2] + 2 * padD - (topshp[2] - 1) * dD
      return [(nkern, ssize, kH, kW, kD)]
  
imports: from __future__ import absolute_import, print_function, division
  import os
  import logging
  from six import integer_types
  import theano
  from theano import Apply
  from theano import gof
  from theano.gof import ParamsType, EnumList
  from theano.scalar import int64
  from theano.tensor import as_tensor_variable, TensorType
  from theano.tensor.nnet.abstract_conv import get_conv_output_shape
  from theano.tensor import blas_headers
  from theano.tensor.blas import ldflags, blas_header_version
label_desc: Use image node_id 2 for calling the Corr3dMM_gradWeights obj's underlying member method code with example usage: obj.infer_shape(node, input_shape) and returns: list