| 1 | #include"BaseModule.h" |
| 2 | |
| 3 | ConvReluBnImpl::ConvReluBnImpl(int input_channel, int output_channel, int kernel_size, int stride) { |
| 4 | conv = register_module("conv", torch::nn::Conv2d(conv_options(input_channel,output_channel,kernel_size,stride,kernel_size/2))); |
| 5 | bn = register_module("bn", torch::nn::BatchNorm2d(output_channel)); |
| 6 | |
| 7 | } |
| 8 | |
| 9 | torch::Tensor ConvReluBnImpl::forward(torch::Tensor x) { |
| 10 | x = torch::relu(conv->forward(x)); |
nothing calls this directly
no test coverage detected