def update_topology(self, topology_str): dna = pg.from_json(topology_str) decoded = self.template.decode(dna) if self.edge_policy_sample_mode == "independent": list_of_edges = [] for sector_list_of_edges in decoded: list_of_edges.extend(sector_list_of_edges) else: list_of_edges = decoded self.edge_dict = self.list_to_edge_dict(list_of_edges)
def update_topology(self, topology_str): """Partition is dict: color_index -> List[edges].""" self.partition = convert_to_color_to_edge( self.template.decode(pg.from_json(topology_str))) self.partition_weights_to_network_weights(self.true_weights)
def update_topology(self, topology_str): dna = pg.from_json(topology_str) decoded_dna = self.template.decode(dna) list_of_edges = self.mask_to_edge_list(decoded_dna["boolean_mask"]) self.edge_dict = self.list_to_edge_dict(list_of_edges)
def update_topology(self, topology_str): dna = pg.from_json(topology_str) decoded_dna = self.template.decode(dna) self.edge_dict = self.list_to_edge_dict(decoded_dna["edge_search_space"]) self.node_op_dict = decoded_dna["op_search_space"]