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

Public Member Functions

 __init__ (self, in_channels, out_channels, bn_norm, stride=1, groups=1)
 
 forward (self, x)
 

Public Attributes

 conv
 
 bn
 
 relu
 

Detailed Description

3x3 convolution + bn + relu.

Definition at line 114 of file osnet.py.

Constructor & Destructor Documentation

◆ __init__()

fastreid.modeling.backbones.osnet.Conv3x3.__init__ ( self,
in_channels,
out_channels,
bn_norm,
stride = 1,
groups = 1 )

Definition at line 117 of file osnet.py.

117 def __init__(self, in_channels, out_channels, bn_norm, stride=1, groups=1):
118 super(Conv3x3, self).__init__()
119 self.conv = nn.Conv2d(
120 in_channels,
121 out_channels,
122 3,
123 stride=stride,
124 padding=1,
125 bias=False,
126 groups=groups
127 )
128 self.bn = get_norm(bn_norm, out_channels)
129 self.relu = nn.ReLU(inplace=True)
130

Member Function Documentation

◆ forward()

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

Definition at line 131 of file osnet.py.

131 def forward(self, x):
132 x = self.conv(x)
133 x = self.bn(x)
134 x = self.relu(x)
135 return x
136
137

Member Data Documentation

◆ bn

fastreid.modeling.backbones.osnet.Conv3x3.bn

Definition at line 128 of file osnet.py.

◆ conv

fastreid.modeling.backbones.osnet.Conv3x3.conv

Definition at line 119 of file osnet.py.

◆ relu

fastreid.modeling.backbones.osnet.Conv3x3.relu

Definition at line 129 of file osnet.py.


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