xnn.gnn.models.megnet_foundation.from_foundation#
- xnn.gnn.models.megnet_foundation.from_foundation(name='megnet-mp-2018.6.1-eform', dtype=None, cache_dir=None, quiet=False)[source]#
Download (once) and convert a registered MatGL MEGNet model.
- Parameters:
name (str, optional) – A key of
FOUNDATION_MODELS, by default the formation energy model.dtype (torch.dtype or str, optional) – Final dtype;
Nonekeeps the checkpoint’s float32.cache_dir (str or pathlib.Path, optional) – Model cache directory (the hub’s default when
None).quiet (bool, optional) – Hide the download progress bars. Default
False.
- Returns:
The converted model, in evaluation mode; the multi-fidelity model knows its fidelities by name (
MEGNet.state_label()).- Return type: