MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / Conv2dReLUImpl

Method Conv2dReLUImpl

lesson6-Segmentation/UNetDecoder.cpp:21–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21Conv2dReLUImpl::Conv2dReLUImpl(int in_channels, int out_channels, int kernel_size, int padding){
22 conv2d = torch::nn::Conv2d(conv_options(in_channels,out_channels,kernel_size,1,padding));
23 bn = torch::nn::BatchNorm2d(torch::nn::BatchNorm2dOptions(out_channels));
24 register_module("conv2d", conv2d);
25 register_module("bn", bn);
26}
27
28torch::Tensor Conv2dReLUImpl::forward(torch::Tensor x){
29 x = conv2d->forward(x);

Callers

nothing calls this directly

Calls 1

conv_optionsFunction · 0.70

Tested by

no test coverage detected