(self, onehot_labels, embeddings)
return init_ops
Perform (data-independent) initialization operations.
Perform (data-independent) initialization operations.
Perform ( data - independent ) initialization operations .
def episodic_init_ops(self, onehot_labels, embeddings):
    """Perform (data-independent) initialization operations."""
    del onehot_labels
    del embeddings

    init_ops = []
    for i in range(self.num_components):
      component_variables = dict(
          (k, v)
          for k, v in self.keyed_variables.items()
          if '{}/{}'.format(self.task_attribute_name, i) in k)
      sorted_component_variable_keys = sorted(component_variables.keys())
      sorted_meta_variable_keys = sorted(self.meta_parameters.keys())
      sorted_component_variables = (
          component_variables[k] for k in sorted_component_variable_keys)
      sorted_meta_variables = (
          self.meta_parameters[k] for k in sorted_meta_variable_keys)
      init_ops += [
          assignee_variables.assign(assigner_variables)
          for assignee_variables, assigner_variables in zip(
              sorted_component_variables, sorted_meta_variables)
      ]
    return init_ops
def episodic_init_ops ( self , onehot_labels , embeddings ) : del onehot_labels del embeddings init_ops = [ ] for i in range ( self . num_components ) : component_variables = dict ( ( k , v ) for k , v in self . keyed_variables . items ( ) if '{}/{}' . format ( self . task_attribute_name , i ) in k ) sorted_component_variable_keys = sorted ( component_variables . keys ( ) ) sorted_meta_variable_keys = sorted ( self . meta_parameters . keys ( ) ) sorted_component_variables = ( component_variables [ k ] for k in sorted_component_variable_keys ) sorted_meta_variables = ( self . meta_parameters [ k ] for k in sorted_meta_variable_keys ) init_ops += [ assignee_variables . assign ( assigner_variables ) for assignee_variables , assigner_variables in zip ( sorted_component_variables , sorted_meta_variables ) ] return init_ops