class_docstr: Warm starts current trial with loss weighted average of previous trials.
class_docstr_tok: ["Warm","starts","current","trial","with","loss","weighted","average","of","previous","trials","."]
code: def _combine_previous_trial_variables(self, trial_to_var):
      trials, variables = list(zip(*trial_to_var))
      # Negate losses so we can softmax them.
      losses = [
          -trial.final_measurement.objective_value for trial in trials
      ]
      losses = tf.convert_to_tensor(value=losses, dtype=tf.float32)
      weights = tf.nn.softmax(losses)
      weighted = [weights[i] * var for i, var in enumerate(variables)]
      return tf.reduce_mean(
          input_tensor=tf.stack(weighted, axis=0), axis=0
      )
  
file_path: model_search/model_search/meta/transfer_learning.py
imports: import abc
  from absl import logging
  from model_search.architecture import architecture_utils
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the LossWeightedAverageTransferLearningHook obj's underlying member method code with example usage: obj._combine_previous_trial_variables(trial_to_var) and returns: tf