| 73 | } |
| 74 | |
| 75 | GAUBlockImpl::GAUBlockImpl(int in_channels, int out_channels, std::string upscale_mode) { |
| 76 | align_corners = upscale_mode == "bilinear"; |
| 77 | conv1 = torch::nn::Sequential( |
| 78 | torch::nn::AdaptiveAvgPool2d(torch::nn::AdaptiveAvgPool2dOptions(1)), |
| 79 | ConvBnRelu(out_channels, out_channels, 1, 1, 0, 1, 1, true, false), |
| 80 | torch::nn::Sigmoid() |
| 81 | ); |
| 82 | conv2 = ConvBnRelu(in_channels, out_channels, 3, 1, 1); |
| 83 | |
| 84 | register_module("conv1", conv1); |
| 85 | register_module("conv2", conv2); |
| 86 | } |
| 87 | |
| 88 | torch::Tensor GAUBlockImpl::forward(torch::Tensor x, torch::Tensor y) { |
| 89 | auto h = x.sizes()[2]; |
nothing calls this directly
no outgoing calls
no test coverage detected