| 21 | |
| 22 | |
| 23 | PSPModuleImpl::PSPModuleImpl(int in_channels, std::vector<int> _sizes, bool use_bathcnorm) { |
| 24 | for (auto size : _sizes) { |
| 25 | blocks->push_back(PSPBlock(in_channels, in_channels / _sizes.size(), size, use_bathcnorm)); |
| 26 | } |
| 27 | register_module("blocks", blocks); |
| 28 | } |
| 29 | |
| 30 | torch::Tensor PSPModuleImpl::forward(torch::Tensor x) { |
| 31 | std::vector<torch::Tensor> xs; |