message: Used conv_utils.output_length
diff: @@ -233,8 +233,30 @@ class Conv(Layer):
  # Check if output shapes are valid
  # They must not have 0 entries along any dimension
  - output_shape = self.compute_output_shape(input_shape).as_list()
  - output_shape = list(filter((None).__ne__, output_shape))
  + if self._channels_first:
  + for idx,dimension in enumerate(input_shape.as_list()[2:]):
  + output_dimension = conv_utils.conv_output_length(dimension,
  + self.kernel_size[idx],
  + self.padding,
  + self.strides[idx],
  + dilation = self.dilation_rate[idx])
  + if output_dimesion<=0:
  + raise ValueError('One of the dimensions in output tensor is less than or'
  + ' equal to zero. Please check the input shape. '
  + ' Recieved input: %s'%input_shape)
  +
  + else:
  + for idx,dimension in enumerate(input_shape.as_list()[1:-1]):
  + output_dimension = conv_utils.conv_output_length(dimension,
  + self.kernel_size[idx],
  + self.padding,
  + self.strides[idx],
  + dilation = self.dilation_rate[idx])
  + if output_dimesion<=0:
  + raise ValueError('One of the dimensions in output tensor is less than or'
  + ' equal to zero. Please check the input shape. '
  + ' Recieved input: %s'%input_shape)
  +
  if 0 in output_shape:
  raise ValueError('One of the dimensions in output tensor is less than or'
  ' equal to zero. Please check the input shape. '
  