code: def _conv_shape_tuple(self, lhs_shape, rhs_shape, strides, pads):
      
      if isinstance(pads, str):
        pads = padtype_to_pads(lhs_shape[2:], rhs_shape[2:], strides, pads)
      if len(pads) != len(lhs_shape) - 2:
        msg = 'Wrong number of explicit pads for conv: expected {}, got {}.'
        raise TypeError(msg.format(len(lhs_shape) - 2, len(pads)))
      lhs_padded = onp.add(lhs_shape[2:], onp.add(*zip(*pads)))
      out_space = onp.floor_divide(
          onp.subtract(lhs_padded, rhs_shape[2:]), strides) + 1
      out_space = onp.maximum(0, out_space)
      out_shape = (lhs_shape[0], rhs_shape[0]) + tuple(out_space)
      return tuple(out_shape)
docs: Compute the shape of a conv given input shapes in canonical order.