5,337
edits
Line 59: | Line 59: | ||
This is performed using multiple parallel convolutions of the input, each with different dilation sizes. | This is performed using multiple parallel convolutions of the input, each with different dilation sizes. | ||
< | <syntaxhighlight lang="python"> | ||
#... make model | #... make model | ||
def convbn(in_planes, out_planes, kernel_size, stride, pad, dilation): | def convbn(in_planes, out_planes, kernel_size, stride, pad, dilation): | ||
Line 77: | Line 77: | ||
self.aspp4 = nn.Sequential(convbn(160, 32, 3, 1, 1, 18), nn.ReLU(inplace=True)) | self.aspp4 = nn.Sequential(convbn(160, 32, 3, 1, 1, 18), nn.ReLU(inplace=True)) | ||
self.aspp5 = nn.Sequential(convbn(160, 32, 3, 1, 1, 24), nn.ReLU(inplace=True)) | self.aspp5 = nn.Sequential(convbn(160, 32, 3, 1, 1, 24), nn.ReLU(inplace=True)) | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="python"> | ||
#... call | #... call | ||
ASPP1 = self.aspp1(output_skip_c) | ASPP1 = self.aspp1(output_skip_c) | ||
Line 86: | Line 86: | ||
ASPP5 = self.aspp5(output_skip_c) | ASPP5 = self.aspp5(output_skip_c) | ||
output_feature = torch.cat((output_raw, ASPP1,ASPP2,ASPP3,ASPP4,ASPP5), 1) | output_feature = torch.cat((output_raw, ASPP1,ASPP2,ASPP3,ASPP4,ASPP5), 1) | ||
</ | </syntaxhighlight> | ||
===Learnable Cost Volume=== | ===Learnable Cost Volume=== |