Download model_module.py from yeq6x/TripletGeoEncoder-demo: direct link, hf CLI and curl.
- Browser
- Download file 343 Bytes
-
https://huggingface.co/spaces/yeq6x/TripletGeoEncoder-demo/resolve/main/model_module.py
- Command line
-
hf download hf://spaces/yeq6x/TripletGeoEncoder-demo/model_module.py
-
curl -L -o model_module.py https://huggingface.co/spaces/yeq6x/TripletGeoEncoder-demo/resolve/main/model_module.py
343 Bytes
| import pytorch_lightning as pl | |
| from model import Autoencoder | |
| class AutoencoderModule(pl.LightningModule): | |
| def __init__(self, feature_dim=64): | |
| super(AutoencoderModule, self).__init__() | |
| self.feature_dim = feature_dim | |
| self.model = Autoencoder(self.feature_dim) | |
| def forward(self, x): | |
| return self.model(x) | |