MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / from_state_dict

Method from_state_dict

easygraph/classes/hypergraph.py:160–168  ·  view source on GitHub ↗

r"""Load the hypergraph from the state dict. Args: ``state_dict`` (``dict``): The state dict to load the hypergraph.

(state_dict: dict)

Source from the content-addressed store, hash-verified

158 # some construction functions
159 @staticmethod
160 def from_state_dict(state_dict: dict):
161 r"""Load the hypergraph from the state dict.
162
163 Args:
164 ``state_dict`` (``dict``): The state dict to load the hypergraph.
165 """
166 _hg = Hypergraph(state_dict["num_v"])
167 _hg._raw_groups = deepcopy(state_dict["raw_groups"])
168 return _hg
169
170 @staticmethod
171 def _e_list_from_feature_kNN(features: torch.Tensor, k: int):

Callers 3

loadMethod · 0.45
drop_hyperedgesMethod · 0.45

Calls 1

HypergraphClass · 0.85

Tested by

no test coverage detected