class_docstr: This Op serves a dual purpose: it can implement a vanilla 2D convolution
  (as taught in any signal processing class) or implement the
  convolutional layers found in Convolutional Neural Networks.
  
  In this setting, a set of 3D images is convolved with a set of 3D kernels,
  with the particularity that their leading dimensions are of equal length.
  Vanilla 2D convolution is treated as a special case of this.
  
  The input parameter represents a mini-batch of multiple images. Its shape is:
      batch size x num. input feature maps x image height x image width
  
  The kernel parameter represents a set of 3D kernels. Its shape is:
      number of filters x num. input images x filter height x filter width
  
  The output of ConvOp is a 4D tensor, generated as follows:
      output[b,k,:,:] = \sum_i input[b,i,:,:] * filter[k,i,:,:] \forall b,k
  where b is the mini-batch index, k the filter index and * is the
  convolution operator.
  
  The constructor initializes a ConvOp with given output_mode (full/valid).
  All other parameters are optional and are only used to generate more
  optimized c code, or to enable graph optimizers to optimally replace the
  ConvOp.
  
  NOTES ON OPTIMIZATION:
  There are two types of optimization. The first is the selection of the
  fastest algo when bsize and nkern are provided with imshp and kshp.
  By default we try to select the fastest version. You can specify it
  with the unroll_batch, unroll_kern, and unroll_patch parameter.
  
  The second type of optimization is hardcoding some dimensions into the
  code when all shape are know.
  This make a significant difference for the 'full' output_mode.
  
  Sometimes, the fastest implementation on x86-64 uses
  {unroll_batch=4, unroll_kern=4, unroll_patch=False}
  with all other shape parameters being provided.
  
  For optimizing other architectures, see:
  Kazushige Goto and Robert A. Van De Geijn, Anatomy of High-Performance
  Matrix Multiplication, (mr x nr). ACM Transactions on Mathematical
  Software, May 2008.
  Figure 12: (mr x nr). For x86 use 2x4, itanium 8x8, etc.
  
  Parameters
  ----------
  output_mode : {'valid', 'full'}
      'valid' gives an output smaller then the image.
      'full' gives an output bigger then the image.
       See 'border_mode' in conv2d's doc.
  
  Optional parameters: (will generate more optimal c code)
  
  imshp : tuple of len 2 or 3: 2 for 2d image, 3 for a stack of 2d images.
      Stacksize, nb image row, nb image col.
  kshp : tuple of len 2
      Nb kernel row, nb kernel col.
  nkern : int
      The number of kernel.
  bsize : int
      The size of the minibatch.
  dx : int
      Patch stride rows.
  dy : int
      Patch stride cols
  
  Params which select the version of code used:
  
  unroll_patch : bool
      Use a version of c_code that unroll the patch loop that don't
      request all shape information to work, but if all shape information
      are present, will use it to hardcode the value in the code for
      faster code.
  unroll_batch : int
      Use a version of c_code that unroll the batch (by unroll_batch)
      and the nkern (by unroll_kern) loop. The size must by a multiple
      of bsize or nkern respectively.
  unroll_kern : int
      Use a version of c_code that unroll the batch
      (by unroll_batch) and the nkern(by unroll_kern) loop. The size
      must by a multiple of bsize or nkern respectively.
  verbose : int
      Passed to GpuConv.
  version: int or str
      Passed to GpuConv, if version='no_fft', fft
      optimization will be desactivated at the op level.
  direction_hint: {'forward', 'bprop weights', 'bprop inputs'}
      Passed to GpuConv, used by graph optimizers to aid algorithm choice.
  
  The 3 following parameters are used internally when we generate
  the gradient when dx!=1 or dy!=1.
  
  imshp_logical
      Default None. None value is equivalent to imshp value.
      When imshp_logical != imshp, it tell we need to insert 0 in
      the image before we do the convolution. For example, when dx==dy==2
      and the image is [[1, 2], [3, 4]], we should make as if the image
      was [[1, 0, 2, 0], [0, 0, 0, 0], [3, 0, 4, 0], [0, 0, 0, 0]].
      Our python code insert the zero, but the c code optimize it.
      imshp_logical != imshp when taking the grad again the weights or
      the image when the output_mode is full and `dx != 1` or `dy != 1`.
  kshp_logical
      Idem but for kshp and used for the grad again the
      weights when the output_mode is valid and `dx != 1` or `dy != 1`.
  kshp_logical_top_aligned
      Used in the same case. Default to True.
      Set to False in the grad again the weight when the
      output_mode is full.
code: def has_all_shape(imshp, kshp, nkern=1, bsize=1):
      return (
          nkern is not None
          and bsize is not None
          and all(shp is not None for shp in imshp)
          and all(shp is not None for shp in kshp)
      )
  
imports: from __future__ import absolute_import, print_function, division
  import logging
  import numpy
  from six.moves import xrange
  import warnings
  import theano
  from theano import OpenMPOp
  from theano.tensor import as_tensor_variable, blas, get_scalar_constant_value, patternbroadcast, NotScalarConstantError
  from theano.gof import Apply
  from theano.tensor.nnet.abstract_conv import get_conv_output_shape, get_conv_shape_1axis
label_desc: Use image node_id 1 for calling the ConvOp obj's underlying member method code with example usage: obj.has_all_shape(imshp, kshp, nkern, bsize) and returns: unknown