MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / up_conv_bn_relu

Class up_conv_bn_relu

preprocess/auxiliary/ICNet.py:62–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61
62class up_conv_bn_relu(nn.Module):
63 def __init__(self,up_size, in_channels, out_channels = 64, kernal_size = 1, padding =0, stride = 1):
64 super(up_conv_bn_relu,self).__init__()
65 self.upSample = nn.Upsample(size = (up_size,up_size),mode="bilinear",align_corners=True)
66 self.conv = nn.Conv2d(in_channels=in_channels,out_channels=out_channels,kernel_size = kernal_size, stride = stride, padding= padding)
67 self.bn = nn.BatchNorm2d(num_features=out_channels)
68 self.act = nn.ReLU()
69
70 def forward(self,x):
71 x = self.upSample(x)
72 x = self.conv(x)
73 x = self.bn(x)
74 x = self.act(x)
75 return x
76
77
78

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected