(self, h)
| 252 | module.bias.data.zero_() |
| 253 | |
| 254 | def forward_attention(self, h): |
| 255 | A_ = self.attention_survival_net(h) # h shape is N_tilesxdim |
| 256 | A_raw = torch.transpose(A_, 1, 0) # K_attention_classesxN_tiles |
| 257 | A = F.softmax(A_raw, dim=-1) # #normalize attentions scores over tiles |
| 258 | return A_raw, A |
| 259 | |
| 260 | def forward_fusion(self, h1, h2, h3): |
| 261 |