RandomPosterization layer

[source]

RandomPosterization class

keras.layers.RandomPosterization(
    factor, value_range=(0, 255), data_format=None, seed=None, **kwargs
)

Reduces the number of bits for each color channel.

References

Arguments

  • value_range: a tuple or a list of two elements. The first value represents the lower bound for values in passed images, the second represents the upper bound. Images passed to the layer should have values within value_range. Defaults to (0, 255).
  • factor: integer, the number of bits to keep for each channel. Must be a value between 1-8.