This repository was archived by the owner on Nov 21, 2025. It is now read-only.
ENH: Enable Moving Average Encoder in DeepMIL #872
Draft
kenza-bouzid wants to merge 14 commits intomainfrom
Draft
ENH: Enable Moving Average Encoder in DeepMIL #872kenza-bouzid wants to merge 14 commits intomainfrom
kenza-bouzid wants to merge 14 commits intomainfrom
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more.
|
harshita-s
reviewed
Apr 17, 2023
| def get_target_network(pl_module: pl.LightningModule) -> torch.nn.Module: | ||
| """Return target network from pl_module. | ||
|
|
||
| :param pl_module: net containing target_network |
Contributor
There was a problem hiding this comment.
LightningModule containing ...
harshita-s
reviewed
Apr 17, 2023
| ) | ||
| ma_tau: float = param.Number( | ||
| default=0.99, | ||
| doc="Tau parameter for moving average encoder. Default is 0.99.", |
Contributor
There was a problem hiding this comment.
what does this tau stand for? momentum? Could be specified in the docs
harshita-s
reviewed
Apr 17, 2023
| """Embed instances in chunks to avoid OOM errors. | ||
|
|
||
| :param instances: Tensor of shape N x C x H x W where N is the bag size | ||
| :param encoder: The encoder module |
Contributor
There was a problem hiding this comment.
why is encoder module passed here instead of using self.encoder?
harshita-s
reviewed
Apr 17, 2023
| self.ma_max_bag_size = ma_max_bag_size | ||
| self.apply_ma_inference = apply_ma_inference | ||
| self.ma_encoder = deepcopy(self.encoder) | ||
| set_module_gradients_enabled(self.ma_encoder, False) |
Contributor
There was a problem hiding this comment.
perhaps check if this is doing the right thing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.