Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate masks on-the-fly in batches #717

Open
loostrum opened this issue Feb 28, 2024 · 0 comments
Open

Generate masks on-the-fly in batches #717

loostrum opened this issue Feb 28, 2024 · 0 comments

Comments

@loostrum
Copy link
Member

When using many masks, pre-generating them all could use too much memory.
In the dianna-deeprank branch (see

self.avg_mask = np.zeros(img_shape)
), we implemented a way to generate masks on the fly for RISE. This may be useful to add to the general DIANNA code.

It works as follows:
Masks are generated per batch. A running average is used to update the RISE output after running it with a new batch of masks.
Additionally we implemented an early stopping feature. The number of masks is no longer a set number that is used, but rather a maximum. When the output of RISE doesn't change anymore (to some tolerance), it stops and reports how many masks were actually used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant