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

VIT Decoder updates #339

Merged
merged 8 commits into from
Feb 29, 2024
Merged

VIT Decoder updates #339

merged 8 commits into from
Feb 29, 2024

Conversation

benjijamorris
Copy link
Contributor

@benjijamorris benjijamorris commented Feb 29, 2024

What does this PR do?

  • add CrossMAE
  • Fix supperres typo
  • add multi-channel projection convolutional decoder option

Before submitting

  • Did you make sure title is self-explanatory and the description concisely explains the PR?
  • [] Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you test your PR locally with pytest command?
  • Did you run pre-commit hooks with pre-commit run -a command?

Did you have fun?

Make sure you had fun coding 🙃

super().__init__()
self.num_heads = num_heads
head_dim = decoder_dim // num_heads
# NOTE scale factor was wrong in my original version, can set manually to be compat with prev weights
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this your note?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I can remove that

ritvikvasan
ritvikvasan previously approved these changes Feb 29, 2024
import torch
from einops.layers.torch import Rearrange
from monai.networks.blocks import UnetOutBlock, UnetResBlock, UpSample

from cyto_dl.nn.vits.mae import MAE_Encoder


class SupperresDecoder(torch.nn.Module):
class SuperresDecoder(torch.nn.Module):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unrelated to crossMAE but just in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, started as a general decoder update, I can rename the pr

@benjijamorris benjijamorris changed the title Feature/CrossMAE VIT Decoder updates Feb 29, 2024
@benjijamorris benjijamorris merged commit 7536cd8 into main Feb 29, 2024
4 of 8 checks passed
@benjijamorris benjijamorris deleted the feature/vit_decoder branch February 29, 2024 20:10
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

Successfully merging this pull request may close these issues.

2 participants