class_docstr: Note: is ACTUALLY a cross-correlation i.e. weights are not 'flipped'
class_docstr_tok: ["Note",":","is","ACTUALLY","a","cross-correlation","i.e",".","weights","are","not","'flipped","'"]
code: def _compute_shape(self, input_shape):
      # assuming a theano dimension ordering here...
      shape_to_return = [None]
      if input_shape is None or input_shape[1] is None:
          shape_to_return += [None]
      else:
          if self.padding == PaddingMode.valid:
              # overhands are excluded
              shape_to_return.append(
                  1
                  + int(
                      (input_shape[1] - self.kernel.shape[0])
                      / self.stride
                  )
              )
          elif self.padding == PaddingMode.same:
              shape_to_return.append(
                  int((input_shape[1] + self.stride - 1) / self.stride)
              )
          else:
              raise RuntimeError(
                  "Please implement shape inference for"
                  " padding mode: " + str(self.padding)
              )
      shape_to_return.append(
          self.kernel.shape[-1]
      )  # num output channels
      return shape_to_return
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import absolute_import
  from .core import *
  from .helper_functions import conv1d_transpose_via_conv2d
  from .None import helper_functions
  import tensorflow
label_desc: Use image node_id 2 for calling the Conv1D obj's underlying member method code with example usage: obj._compute_shape(input_shape) and returns: shape_to_return