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

Function SeparableConv2d

src/architectures/DeepLabDecoder.cpp:12–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12torch::nn::Sequential SeparableConv2d(int in_channels, int out_channels, int kernel_size, int stride,
13 int padding, int dilation, bool bias) {
14 torch::nn::Conv2d dephtwise_conv = torch::nn::Conv2d(conv_options(in_channels, in_channels, kernel_size,
15 stride, padding, 1, false, dilation));
16 torch::nn::Conv2d pointwise_conv = torch::nn::Conv2d(conv_options(in_channels, out_channels, 1, 1, 0, 1, bias));
17 return torch::nn::Sequential(dephtwise_conv, pointwise_conv);
18};
19
20torch::nn::Sequential ASPPSeparableConv(int in_channels, int out_channels, int dilation) {
21 torch::nn::Sequential seq = SeparableConv2d(in_channels, out_channels, 3, 1, dilation, dilation, false);

Callers 2

ASPPSeparableConvFunction · 0.85

Calls 1

conv_optionsFunction · 0.85

Tested by

no test coverage detected