Download algorithms/worldmem/models/cameractrl_module.py from BonanDing/DeMemWM: direct link, hf CLI and curl.
- Browser
- Download file 380 Bytes
-
https://huggingface.co/BonanDing/DeMemWM/resolve/main/algorithms/worldmem/models/cameractrl_module.py
- Command line
-
hf download hf://BonanDing/DeMemWM/algorithms/worldmem/models/cameractrl_module.py
-
curl -L -o cameractrl_module.py https://huggingface.co/BonanDing/DeMemWM/resolve/main/algorithms/worldmem/models/cameractrl_module.py
380 Bytes
| import torch.nn as nn | |
| class SimpleCameraPoseEncoder(nn.Module): | |
| def __init__(self, c_in, c_out, hidden_dim=128): | |
| super(SimpleCameraPoseEncoder, self).__init__() | |
| self.model = nn.Sequential( | |
| nn.Linear(c_in, hidden_dim), | |
| nn.ReLU(), | |
| nn.Linear(hidden_dim, c_out) | |
| ) | |
| def forward(self, x): | |
| return self.model(x) | |