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

Class DecoderBlockImpl

src/architectures/UNetDecoder.h:26–37  ·  view source on GitHub ↗

decoderblock and center block

Source from the content-addressed store, hash-verified

24
25//decoderblock and center block
26class DecoderBlockImpl: public torch::nn::Module{
27public:
28 DecoderBlockImpl(int in_channels, int skip_channels, int out_channels, bool skip = true, bool attention = false);
29 torch::Tensor forward(torch::Tensor x, torch::Tensor skip);
30private:
31 Conv2dReLU conv1{nullptr};
32 Conv2dReLU conv2{nullptr};
33 SCSEModule attention1{nullptr};
34 SCSEModule attention2{nullptr};
35 torch::nn::Upsample upsample{nullptr};
36 bool is_skip = true;
37};TORCH_MODULE(DecoderBlock);
38
39torch::nn::Sequential CenterBlock(int in_channels, int out_channels);
40

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected