Update logic2.py
Browse files
logic2.py
CHANGED
@@ -67,10 +67,10 @@ def load_hetero_data():
|
|
67 |
data = pickle.load(file)
|
68 |
return data
|
69 |
|
70 |
-
def load_model(
|
71 |
model = Model(hidden_channels=32)
|
72 |
with torch.no_grad():
|
73 |
-
model.encoder(
|
74 |
model.load_state_dict(torch.load('model.pt',map_location=torch.device('cpu')))
|
75 |
model.eval()
|
76 |
return model
|
|
|
67 |
data = pickle.load(file)
|
68 |
return data
|
69 |
|
70 |
+
def load_model(data):
|
71 |
model = Model(hidden_channels=32)
|
72 |
with torch.no_grad():
|
73 |
+
model.encoder(data.x_dict, data.edge_index_dict)
|
74 |
model.load_state_dict(torch.load('model.pt',map_location=torch.device('cpu')))
|
75 |
model.eval()
|
76 |
return model
|