зеркало из https://github.com/microsoft/ptgnn.git
Restore models in-cpu.
This commit is contained in:
Родитель
060765d6d6
Коммит
b22b91fca7
|
@ -86,10 +86,10 @@ def run(arguments):
|
||||||
restore_path = arguments.get("--restore-path", None)
|
restore_path = arguments.get("--restore-path", None)
|
||||||
if restore_path:
|
if restore_path:
|
||||||
initialize_metadata = False
|
initialize_metadata = False
|
||||||
model, nn = Graph2Class.restore_model(Path(restore_path))
|
model, nn = Graph2Class.restore_model(Path(restore_path), device="cpu")
|
||||||
elif arguments["--aml"] and model_path.exists():
|
elif arguments["--aml"] and model_path.exists():
|
||||||
initialize_metadata = False
|
initialize_metadata = False
|
||||||
model, nn = Graph2Class.restore_model(model_path)
|
model, nn = Graph2Class.restore_model(model_path, device="cpu")
|
||||||
else:
|
else:
|
||||||
nn = None
|
nn = None
|
||||||
model = create_graph2class_gnn_model()
|
model = create_graph2class_gnn_model()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче