PR #62807: Validate argument minvalue of tf.random.uniform
PR #62807: Validate argument minvalue of tf.random.uniform

Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/62807

At present the API, `tf.random.uniform` raises `InvalidArgumentError` if `minval` >= `maxval` for `int` dtype only. This check happens in C++ backend for `int` data type only.

However same is not true for `float` datatype. It will not raise an error and It is ignoring min and max values in this case considering the range only.

The behaviour should be same for `int` and `float` dtypes. Hence for uniformity, I am adding validation for same at python level itself.

Attaching gist for same.

This is effecting `keras.initializers.RandomUniform` also which was discussed in tf-kears repo at #[449](https://github.com/keras-team/tf-keras/issues/449)
Copybara import of the project:

--
a4687946257fe104f393dc65a9b024a82b9955ee by Surya <116063290+SuryanarayanaY@users.noreply.github.com>:

Validate argument minvalue of tf.random.uniform

At present the API, tf.random.uniform raises InvalidArgumentError if minval>=maxval for int dtype only. This check happens in C++ backend for int data type only.

However same is not true for float datatype. It will not raise an error and , It will consider a range ignoring min and max values in this case.

The behaviour should be same for int and float dtypes.Hence I am adding validation for same at python level itself.
--
6ba45e1b2a794905ca59562467b82a09a2f1c4c5 by Surya <116063290+SuryanarayanaY@users.noreply.github.com>:

Validated random.uniform args with check_ops

Validated random.uniform args with check_ops.

Merging this change closes #62807

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/tensorflow/pull/62807 from tensorflow:SuryanarayanaY-patch-5 6ba45e1b2a794905ca59562467b82a09a2f1c4c5
