baal-org / baal

Bayesian active learning library for research and industrial usecases.
https://baal.readthedocs.io
Apache License 2.0
854 stars 84 forks source link

Support for Partial Monte-Carlo dropout #255

Closed pieterblok closed 1 year ago

pieterblok commented 1 year ago

https://github.com/baal-org/baal/discussions/252#discussioncomment-5212884

Summary:

Support for Partial Monte-Carlo dropout in modelwrapper.py. This procedure supports the execution of a custom made function called montecarlo_forward in the model class. If this montecarlo_forward function is not present, then execute the standard repeated image analysis.

Montecarlo_forward is an altered forward pass that only iterates the network parts that have dropout. Because there can be different ways of placing the dropout, this function should be custom made (also assuming that there can be different neural network architectures and different forward passes).

Features:

Checklist:

Dref360 commented 1 year ago

Thank you @pieterblok to bring this issue up. In Baal 1.8, we introduced MCCachingModule to speedup MC inference.

What I would like to do next is to have an "Advanced" section in this tutorial that would point to your solution.

Do you mind if I write an example using your method and redirect advanced users to it? You would have full attribution of course!

pieterblok commented 1 year ago

Thank you @pieterblok to bring this issue up. In Baal 1.8, we introduced MCCachingModule to speedup MC inference.

What I would like to do next is to have an "Advanced" section in this tutorial that would point to your solution.

Do you mind if I write an example using your method and redirect advanced users to it? You would have full attribution of course!

@Dref360 thank you for your effort and helping us to achieve this upgrade!

I have already seen your "Advanced section", and it looks good! Feel free to add an example using my previously work around for the advanced users. With that, everything is in place.

Again my gratitude for this nice collaboration! Really appreciate what you are doing for this framework! 🙌

Dref360 commented 1 year ago

Awesome, I'll work on that and make a PR in the coming weeks.

Closing this then!