| 11 | } |
| 12 | |
| 13 | torch::Tensor UpsampleImpl::forward(torch::Tensor x) |
| 14 | { |
| 15 | x = upsample->forward(x); |
| 16 | x = at::upsample_nearest2d(x, { x.sizes()[2] * 2 , x.sizes()[3] * 2 }); |
| 17 | return x; |
| 18 | } |
| 19 | |
| 20 | torch::nn::Sequential yolo_head(std::vector<int> filters_list, int in_filters) { |
| 21 | auto m = torch::nn::Sequential(BasicConv(in_filters, filters_list[0], 3), |