Download pointcept/models/point_transformer/utils.py from dfki-av/BIMStruct3D-segmentation: direct link, hf CLI and curl.
- Browser
- Download file 311 Bytes
-
https://huggingface.co/dfki-av/BIMStruct3D-segmentation/resolve/7ab05dd198d38ea08e60bb1e4f3f04aa369975c2/pointcept/models/point_transformer/utils.py
- Command line
-
hf download hf://dfki-av/BIMStruct3D-segmentation@7ab05dd198d38ea08e60bb1e4f3f04aa369975c2/pointcept/models/point_transformer/utils.py
-
curl -L -o utils.py https://huggingface.co/dfki-av/BIMStruct3D-segmentation/resolve/7ab05dd198d38ea08e60bb1e4f3f04aa369975c2/pointcept/models/point_transformer/utils.py
311 Bytes
| import torch | |
| import torch.nn as nn | |
| torch.nn.LayerNorm | |
| class LayerNorm1d(nn.BatchNorm1d): | |
| def forward(self, input: torch.Tensor) -> torch.Tensor: | |
| return ( | |
| super() | |
| .forward(input.transpose(1, 2).contiguous()) | |
| .transpose(1, 2) | |
| .contiguous() | |
| ) | |