-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add UNETR, ViT #2476
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
add UNETR, ViT #2476
Conversation
Signed-off-by: ahatamizadeh <ahatamizadeh@nvidia.com>
|
|
|
Looks nice! Could you help fix the style errors? https://github.com/Project-MONAI/MONAI/runs/2940634277 |
Signed-off-by: ahatamizadeh <ahatamizadeh@nvidia.com>
@wyli, fixed those issues. But there are further issues in lint and type checks which I will address. |
wyli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, the networks mainly support 3d, would be great to add the 2d support. or we could file a separate feature request and address that later.
| self.drop2 = nn.Dropout(dropout_rate) | ||
|
|
||
| def forward(self, x): | ||
| x = self.fn(self.linear1(x)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be more robust if there's a torch.flatten as the first step?
sure, in many cases mypy is not smart enough to infer the types and can be difficult to fix... you can use |
Signed-off-by: ahatamizadeh <ahatamizadeh@nvidia.com>
Signed-off-by: ahatamizadeh <ahatamizadeh@nvidia.com>
Signed-off-by: ahatamizadeh <ahatamizadeh@nvidia.com>
Signed-off-by: ahatamizadeh <ahatamizadeh@nvidia.com>
|
I think the unit tests took too long to finish on cpu-only testing machine, could you reduce the input size/model size in the unit tests? otherwise please add Lines 128 to 129 in 12f267c
|
Signed-off-by: ahatamizadeh <ahatamizadeh@nvidia.com>
Pushed another version with reduced input sizes. Tests seem to be done in reasonable amount of time on CPU. |
wyli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It looks nice. Could you please help create a ticket about supporting 2d patch embedding and networks
Thanks a lot ! I just created #2499 in response to this. |
Signed-off-by: ahatamizadeh ahatamizadeh@nvidia.com
fixes #2403, part of #2394
Description
This pull request adds the following:
Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests.make htmlcommand in thedocs/folder.