Download code/models/encoder/from_ckpt.py from szcharlesji/yor-patch-policy-checkpoints: direct link, hf CLI and curl.
- Browser
- Download file 188 Bytes
-
https://huggingface.co/szcharlesji/yor-patch-policy-checkpoints/resolve/main/code/models/encoder/from_ckpt.py
- Command line
-
hf download hf://szcharlesji/yor-patch-policy-checkpoints/code/models/encoder/from_ckpt.py
-
curl -L -o from_ckpt.py https://huggingface.co/szcharlesji/yor-patch-policy-checkpoints/resolve/main/code/models/encoder/from_ckpt.py
188 Bytes
| import torch | |
| # for supporting output_dim as metadata for the config | |
| def from_ckpt(f: str, output_dim: int, n_patches: int): | |
| model = torch.load(f, weights_only=False) | |
| return model |