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

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

1x1 convolution + bn + relu.

Definition at line 74 of file osnet.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 77 of file osnet.py.

77 def __init__(self, in_channels, out_channels, bn_norm, stride=1, groups=1):
78 super(Conv1x1, self).__init__()
79 self.conv = nn.Conv2d(
80 in_channels,
81 out_channels,
82 1,
83 stride=stride,
84 padding=0,
85 bias=False,
86 groups=groups
87 )
88 self.bn = get_norm(bn_norm, out_channels)
89 self.relu = nn.ReLU(inplace=True)
90

Member Function Documentation

◆ forward()

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

Definition at line 91 of file osnet.py.

91 def forward(self, x):
92 x = self.conv(x)
93 x = self.bn(x)
94 x = self.relu(x)
95 return x
96
97

Member Data Documentation

◆ bn

fastreid.modeling.backbones.osnet.Conv1x1.bn

Definition at line 88 of file osnet.py.

◆ conv

fastreid.modeling.backbones.osnet.Conv1x1.conv

Definition at line 79 of file osnet.py.

◆ relu

fastreid.modeling.backbones.osnet.Conv1x1.relu

Definition at line 89 of file osnet.py.


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