Definition at line 3 of file gcn_head.py.
◆ __init__()
| gcn_head.GCNHead.__init__ |
( |
| self, |
|
|
| in_channels, |
|
|
| num_class, |
|
|
| input_key ) |
Definition at line 5 of file gcn_head.py.
8 input_key):
9 super().__init__()
10
11 self.pool = nn.AdaptiveAvgPool2d(1)
12 self.fc = nn.Linear(in_channels, num_class)
13 self.input_key = input_key
14
15
◆ forward()
| gcn_head.GCNHead.forward |
( |
| self, |
|
|
| feat_dict ) |
Definition at line 16 of file gcn_head.py.
16 def forward(self, feat_dict):
17 x = feat_dict[self.input_key]
18
19
20 N, C, T, V = x.shape
21
22
23
24
25 x = self.pool(x)
26 x = x.view(N, C)
27
28
29 cls_scores = self.fc(x)
30
31 return cls_scores
◆ fc
◆ input_key
| gcn_head.GCNHead.input_key |
◆ pool
The documentation for this class was generated from the following file: