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

Public Member Functions

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

Public Attributes

 conv
 
 bn
 

Detailed Description

1x1 convolution + bn (w/o non-linearity).

Definition at line 98 of file osnet.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 101 of file osnet.py.

101 def __init__(self, in_channels, out_channels, bn_norm, stride=1):
102 super(Conv1x1Linear, self).__init__()
103 self.conv = nn.Conv2d(
104 in_channels, out_channels, 1, stride=stride, padding=0, bias=False
105 )
106 self.bn = get_norm(bn_norm, out_channels)
107

Member Function Documentation

◆ forward()

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

Definition at line 108 of file osnet.py.

108 def forward(self, x):
109 x = self.conv(x)
110 x = self.bn(x)
111 return x
112
113

Member Data Documentation

◆ bn

fastreid.modeling.backbones.osnet.Conv1x1Linear.bn

Definition at line 106 of file osnet.py.

◆ conv

fastreid.modeling.backbones.osnet.Conv1x1Linear.conv

Definition at line 103 of file osnet.py.


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