Output the attention weights from MILModel #5152
-
Hi MONAI Universe, Is there a method to output the attention weights from the MIL Model? Given input data of the form Any guidance would be much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello, there's a flag MONAI/monai/networks/nets/milmodel.py Line 233 in ca90628 then you can compute the output scores accordingly as implemented here MONAI/monai/networks/nets/milmodel.py Line 174 in ca90628 |
Beta Was this translation helpful? Give feedback.
Hello, there's a flag
no_head
to skip the bag level fusing, perhaps you can set it to False to get BxNxfeatures resultsMONAI/monai/networks/nets/milmodel.py
Line 233 in ca90628
then you can compute the output scores accordingly as implemented here
MONAI/monai/networks/nets/milmodel.py
Line 174 in ca90628