class_docstr: Defines how to apply the EPR algorithm.
class_docstr_tok: ["Defines","how","to","apply","the","EPR","algorithm","."]
code: def init_training_weights(self, pretrained_weight: tf.Tensor):
      (
          prior_shape,
          dtype,
          weight_name,
      ) = self._init_training_weights_reparam(pretrained_weight)
  
      # In addition to reparameterization weights, this method also needs a
      # variable for the probability model (logarithm of scale of prior).
      log_scale = tf.fill(prior_shape, tf.constant(2.5, dtype=dtype))
      self.add_training_weight(
          name=f"{weight_name}_log_scale",
          shape=log_scale.shape,
          dtype=log_scale.dtype,
          initializer=tf.keras.initializers.Constant(log_scale),
      )
  
imports: import functools
  from typing import Callable, List, Tuple
  import tensorflow
  import tensorflow_compression
  from tensorflow_model_optimization.python.core.common.keras.compression import algorithm
label_desc: Use image node_id 1 for calling the EPR obj's underlying member method code with example usage: obj.init_training_weights(pretrained_weight) without return types