Download src/networks/utils.py from ChatterjeeLab/BranchSBM: direct link, hf CLI and curl.
- Browser
- Download file 292 Bytes
-
https://huggingface.co/ChatterjeeLab/BranchSBM/resolve/main/src/networks/utils.py
- Command line
-
hf download hf://ChatterjeeLab/BranchSBM/src/networks/utils.py
-
curl -L -o utils.py https://huggingface.co/ChatterjeeLab/BranchSBM/resolve/main/src/networks/utils.py
292 Bytes
| import sys | |
| import torch | |
| class flow_model_torch_wrapper(torch.nn.Module): | |
| """Wraps model to torchdyn compatible format.""" | |
| def __init__(self, model): | |
| super().__init__() | |
| self.model = model | |
| def forward(self, t, x, *args, **kwargs): | |
| return self.model(t, x) | |