Safemotion Lib
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
fastreid.modeling.backbones.osnet.LightConv3x3 Class Reference
Inheritance diagram for fastreid.modeling.backbones.osnet.LightConv3x3:

Public Member Functions

 __init__ (self, in_channels, out_channels, bn_norm)
 
 forward (self, x)
 

Public Attributes

 conv1
 
 conv2
 
 bn
 
 relu
 

Detailed Description

Lightweight 3x3 convolution.
1x1 (linear) + dw 3x3 (nonlinear).

Definition at line 138 of file osnet.py.

Constructor & Destructor Documentation

◆ __init__()

fastreid.modeling.backbones.osnet.LightConv3x3.__init__ ( self,
in_channels,
out_channels,
bn_norm )

Definition at line 143 of file osnet.py.

143 def __init__(self, in_channels, out_channels, bn_norm):
144 super(LightConv3x3, self).__init__()
145 self.conv1 = nn.Conv2d(
146 in_channels, out_channels, 1, stride=1, padding=0, bias=False
147 )
148 self.conv2 = nn.Conv2d(
149 out_channels,
150 out_channels,
151 3,
152 stride=1,
153 padding=1,
154 bias=False,
155 groups=out_channels
156 )
157 self.bn = get_norm(bn_norm, out_channels)
158 self.relu = nn.ReLU(inplace=True)
159

Member Function Documentation

◆ forward()

fastreid.modeling.backbones.osnet.LightConv3x3.forward ( self,
x )

Definition at line 160 of file osnet.py.

160 def forward(self, x):
161 x = self.conv1(x)
162 x = self.conv2(x)
163 x = self.bn(x)
164 x = self.relu(x)
165 return x
166
167

Member Data Documentation

◆ bn

fastreid.modeling.backbones.osnet.LightConv3x3.bn

Definition at line 157 of file osnet.py.

◆ conv1

fastreid.modeling.backbones.osnet.LightConv3x3.conv1

Definition at line 145 of file osnet.py.

◆ conv2

fastreid.modeling.backbones.osnet.LightConv3x3.conv2

Definition at line 148 of file osnet.py.

◆ relu

fastreid.modeling.backbones.osnet.LightConv3x3.relu

Definition at line 158 of file osnet.py.


The documentation for this class was generated from the following file: