(image)
return tf.math.equal(shape, 3)
Filter function that only lets RGB images go through.

  Args:
    image: Tensor, the image tensor to be checked.
  Returns: bool, whether to keep the image or not.
Filter function that only lets RGB images go through.
Filter function that only lets RGB images go through .
def rgb_filter_function(image):
  """Filter function that only lets RGB images go through.

  Args:
    image: Tensor, the image tensor to be checked.
  Returns: bool, whether to keep the image or not.
  """
  shape = tf.shape(image)[2]
  return tf.math.equal(shape, 3)
def rgb_filter_function ( image ) : shape = tf . shape ( image ) [ 2 ] return tf . math . equal ( shape , 3 )