Repository navigation
Output the attention weights from MILModel #5152
Answered
by
wyli
DocandBean
asked this question in
Q&A
|
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! |
Answered by
wyli
Sep 16, 2022
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 |
2 replies
Answer selected by
DocandBean
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, there's a flag
no_headto 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