Download src/models/modules/downsample.py from ML701G7/taim-gan: direct link, hf CLI and curl.
- Browser
- Download file 360 Bytes
-
https://huggingface.co/spaces/ML701G7/taim-gan/resolve/main/src/models/modules/downsample.py
- Command line
-
hf download hf://spaces/ML701G7/taim-gan/src/models/modules/downsample.py
-
curl -L -o downsample.py https://huggingface.co/spaces/ML701G7/taim-gan/resolve/main/src/models/modules/downsample.py
360 Bytes
| """downsample module.""" | |
| from torch import nn | |
| def down_sample(in_planes: int, out_planes: int) -> nn.Module: | |
| """UpSample module.""" | |
| return nn.Sequential( | |
| nn.Conv2d( | |
| in_planes, out_planes, kernel_size=4, stride=2, padding=1, bias=False | |
| ), | |
| nn.BatchNorm2d(out_planes), | |
| nn.LeakyReLU(0.2, inplace=True), | |
| ) | |