MCPcopy Create free account
hub / github.com/AllentDan/LibtorchSegmentation / DecoderBlockLinkImpl

Method DecoderBlockLinkImpl

src/architectures/LinknetDecoder.cpp:24–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24DecoderBlockLinkImpl::DecoderBlockLinkImpl(int in_channels, int out_channels, bool use_batchnorm) {
25 conv2drelu1 = Conv2dReLU(in_channels, in_channels / 4, 1, 0, 1, use_batchnorm);
26 transpose = TransposeX2(in_channels / 4, in_channels / 4, use_batchnorm);
27 conv2drelu2 = Conv2dReLU(in_channels / 4, out_channels, 1, 0, 1, use_batchnorm);
28
29 register_module("conv2drelu1", conv2drelu1);
30 register_module("transpose", transpose);
31 register_module("conv2drelu2", conv2drelu2);
32}
33
34torch::Tensor DecoderBlockLinkImpl::forward(torch::Tensor x, torch::Tensor skip) {
35 x = conv2drelu1->forward(x);

Callers

nothing calls this directly

Calls 2

Conv2dReLUFunction · 0.85
TransposeX2Function · 0.85

Tested by

no test coverage detected