Download experiments/tdmpc2/src/model.py from cccat6/FlowMo-WM: direct link, hf CLI and curl.
- Browser
- Download file 489 Bytes
-
https://huggingface.co/cccat6/FlowMo-WM/resolve/main/experiments/tdmpc2/src/model.py
- Command line
-
hf download hf://cccat6/FlowMo-WM/experiments/tdmpc2/src/model.py
-
curl -L -o model.py https://huggingface.co/cccat6/FlowMo-WM/resolve/main/experiments/tdmpc2/src/model.py
489 Bytes
| """TD-MPC2 baseline model definition.""" | |
| import torch | |
| from experiments.shared.src.models.image_world_models import TDMPC2ImageWorldModel | |
| from experiments.tdmpc2.src.config import default_config | |
| def build_model(config): | |
| return TDMPC2ImageWorldModel(config) | |
| def load_model(checkpoint_path, config=None): | |
| cfg = default_config() if config is None else config | |
| model = build_model(cfg) | |
| model.load_state_dict(torch.load(checkpoint_path, map_location="cpu")) | |
| return model | |