Download libs/model/__init__.py from uav-vts/training_sem: direct link, hf CLI and curl.
- Browser
- Download file 323 Bytes
-
https://huggingface.co/uav-vts/training_sem/resolve/main/libs/model/__init__.py
- Command line
-
hf download hf://uav-vts/training_sem/libs/model/__init__.py
-
curl -L -o __init__.py https://huggingface.co/uav-vts/training_sem/resolve/main/libs/model/__init__.py
323 Bytes
| from .model import Model | |
| import torch | |
| from torch import nn | |
| from libs.utils.comm import get_world_size | |
| def build_model(cfg): | |
| if get_world_size() == 1: | |
| norm_layer = nn.BatchNorm2d | |
| else: | |
| norm_layer = nn.BatchNorm2d | |
| model = Model( | |
| cfg, | |
| norm_layer=norm_layer | |
| ) | |
| return model | |