code: def test_project_training_weights_has_gradients(self, *shape):
      algorithm = self.get_algorithm()
      init = tf.ones(shape, dtype=tf.float32)
      algorithm.init_training_weights(init)
      layer = tf.keras.layers.Layer()
      for weight_repr in algorithm.weight_reprs:
          layer.add_weight(*weight_repr.args, **weight_repr.kwargs)
      with tf.GradientTape() as tape:
          weight = algorithm.project_training_weights(*layer.weights)
      gradients = tape.gradient(weight, layer.weights)
      self.assertAllEqual(
          [g is not None for g in gradients],
          [
              w.dtype.is_floating and "log_scale" not in w.name
              for w in layer.weights
          ],
      )
  
imports: import os
  import shutil
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_model_optimization.python.core.common.keras.compression.algorithms import epr
label_desc: Use image node_id 3 for calling the EPRTest obj's underlying member method code with example usage: obj.test_project_training_weights_has_gradients() without return types