| 1 | #include "util.h" |
| 2 | |
| 3 | SegmentationHeadImpl::SegmentationHeadImpl(int in_channels, int out_channels, int kernel_size, double _upsampling){ |
| 4 | conv2d = torch::nn::Conv2d(conv_options(in_channels, out_channels, kernel_size, 1, kernel_size / 2)); |
| 5 | upsampling = torch::nn::Upsample(upsample_options(std::vector<double>{_upsampling,_upsampling})); |
| 6 | register_module("conv2d",conv2d); |
| 7 | } |
| 8 | torch::Tensor SegmentationHeadImpl::forward(torch::Tensor x){ |
| 9 | x = conv2d->forward(x); |
| 10 | x = upsampling->forward(x); |
nothing calls this directly
no test coverage detected