Trying to process RBG images and use RandomContrast: LookupError: gradient registry has no entry for: AdjustContrastv2
Hi @RangaSamudrala ,

The `AdjustContrastV2` Op has no gradient registered. Hence you are getting the error. You can have a look into [source](https://www.tensorflow.org/api_docs/python/tf/raw_ops) here to find the list of Ops and  have gradient support or not. This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62145">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62145">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

binary

### TensorFlow version

2.13.0

### Custom code

Yes

### OS platform and distribution

google collaboration

### Mobile device

_No response_

### Python version

3.10.12

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

T4

### Current behavior?

I see an error when I add RandomContrast layer into the model. Otherwise, it works fine.


### Standalone code to reproduce the issue

```shell
# Clean session
clear_session()

model_6 = Sequential()

model_6.add(Conv2D(filters = 16, kernel_size = (3, 3)
                   , padding = "same", input_shape = (img_height, img_wdith, 3)
                   , activation='relu'))


model_6.add(RandomRotation(factor=0.3))
model_6.add(layers.RandomFlip("horizontal_and_vertical"))
model_6.add(MaxPooling2D(pool_size = (2, 2)))
model_6.add(Conv2D(filters = 16, kernel_size = (3, 3) , padding = "same" , activation='relu'))
model_6.add(MaxPooling2D(pool_size = (2, 2)))

# Add batch normalization
batch_normalization = BatchNormalization()
batch_normalization.trainable = True
model_6.add(batch_normalization)
model_6.add(layers.RandomContrast(factor=0.2, seed=11))

model_6.add(Flatten())

# Adding a fully connected dense layer with 256 neurons
model_6.add(Dense(256))

model_6.add(LeakyReLU(0.1))

model_6.add(Dense(num_classes, activation = 'softmax'))

# Printing the model summary
model_6.summary()
```


### Relevant log output

```shell
Epoch 1/20
---------------------------------------------------------------------------
StagingError                              Traceback (most recent call last)
[<ipython-input-72-d1c53732b3af>](https://39j3jgoo0eu-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20231016-060118_RC00_573771261#) in <cell line: 7>()
      5 
      6 # Fit training dataset to model
----> 7 history_6 = model_6.fit(n_train_ds, validation_data=n_val_ds, epochs=num_epochs, verbose = 1 )

1 frames
[/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/autograph_util.py](https://39j3jgoo0eu-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20231016-060118_RC00_573771261#) in autograph_handler(*args, **kwargs)
     50     except Exception as e:  # pylint:disable=broad-except
     51       if hasattr(e, "ag_error_metadata"):
---> 52         raise e.ag_error_metadata.to_exception(e)
     53       else:
     54         raise

StagingError: in user code:

    File "/usr/local/lib/python3.10/dist-packages/keras/src/engine/training.py", line 1338, in train_function  *
        return step_function(self, iterator)
    File "/usr/local/lib/python3.10/dist-packages/keras/src/engine/training.py", line 1322, in step_function  **
        outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "/usr/local/lib/python3.10/dist-packages/keras/src/engine/training.py", line 1303, in run_step  **
        outputs = model.train_step(data)
    File "/usr/local/lib/python3.10/dist-packages/keras/src/engine/training.py", line 1084, in train_step
        self.optimizer.minimize(loss, self.trainable_variables, tape=tape)
    File "/usr/local/lib/python3.10/dist-packages/keras/src/optimizers/optimizer.py", line 543, in minimize
        grads_and_vars = self.compute_gradients(loss, var_list, tape)
    File "/usr/local/lib/python3.10/dist-packages/keras/src/optimizers/optimizer.py", line 276, in compute_gradients
        grads = tape.gradient(loss, var_list)

    LookupError: gradient registry has no entry for: AdjustContrastv2
```
