(self, features,intermediate=False)
| 25 | self.linear = nn.Linear(4 * interm_dim, 1) |
| 26 | |
| 27 | def forward(self, features,intermediate=False): |
| 28 | out1 = self.GAP1(features[0]) |
| 29 | out1 = out1.view(out1.size(0), -1) |
| 30 | out1 = F.relu(self.FC1(out1)) |
| 31 | |
| 32 | out2 = self.GAP2(features[1]) |
| 33 | out2 = out2.view(out2.size(0), -1) |
| 34 | out2 = F.relu(self.FC2(out2)) |
| 35 | |
| 36 | out3 = self.GAP3(features[2]) |
| 37 | out3 = out3.view(out3.size(0), -1) |
| 38 | out3 = F.relu(self.FC3(out3)) |
| 39 | |
| 40 | out4 = self.GAP4(features[3]) |
| 41 | out4 = out4.view(out4.size(0), -1) |
| 42 | out4 = F.relu(self.FC4(out4)) |
| 43 | |
| 44 | out = self.linear(torch.cat((out1, out2, out3, out4), 1)) |
| 45 | if intermediate: |
| 46 | return out,torch.cat((out1, out2, out3, out4),1),[out1, out2, out3, out4] |
| 47 | else: |
| 48 | return out,torch.cat((out1, out2, out3, out4),1) |
| 49 |
nothing calls this directly
no outgoing calls
no test coverage detected