message: Simplify shape inference in Keras resize_images
diff: @@ -3198,8 +3198,11 @@ def resize_images(x, height_factor, width_factor, data_format,
  else:
  raise ValueError('Invalid `data_format` argument: %s' % (data_format,))
  - original_shape = int_shape(x)
  - new_shape = array_ops.shape(x)[rows:cols + 1]
  + new_shape = x.shape[rows:cols + 1]
  + if new_shape.is_fully_defined():
  + new_shape = constant_op.constant(new_shape.as_list(), dtype='int32')
  + else:
  + new_shape = array_ops.shape_v2(x)[rows:cols + 1]
  new_shape *= constant_op.constant(
  np.array([height_factor, width_factor], dtype='int32'))
  @@ -3217,21 +3220,6 @@ def resize_images(x, height_factor, width_factor, data_format,
  if data_format == 'channels_first':
  x = permute_dimensions(x, [0, 3, 1, 2])
  - if original_shape[rows] is None:
  - new_height = None
  - else:
  - new_height = original_shape[rows] * height_factor
  -
  - if original_shape[cols] is None:
  - new_width = None
  - else:
  - new_width = original_shape[cols] * width_factor
  -
  - if data_format == 'channels_first':
  - output_shape = (None, None, new_height, new_width)
  - else:
  - output_shape = (None, new_height, new_width, None)
  - x.set_shape(output_shape)
  return x
  