Open
Conversation
1dbd8aa to
2bab412
Compare
Signed-off-by: Steven Chen <117523987+perctrix@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request extends the UNet implementation with new modular components and factory functions, enabling more flexibility and advanced architectures. The most significant changes include the introduction of attention gates, residual convolutional blocks, and attention-based upsampling, along with new factory functions to easily create UNet variants using these components.
New UNet Components
AttentionGate,UNetResidualConv, andUNetAttentionUpsamplemodules incomponents.pyto provide attention mechanisms, residual connections, and attention-based upsampling for UNet architectures.__init__.pyto export these new components for external use.UNet Factory Functions
make_unet2d_resconvandmake_unet2d_attnupsamplefunctions to quickly instantiate UNet models with residual convolution blocks or attention-based upsampling, respectively.UNet Class Flexibility
UNetclass to accept aconv_blockparameter, allowing users to specify the type of convolutional block (e.g., standard double conv or residual conv) used in the initial layer.Testing and Example Usage
unet.pyto demonstrate instantiation and sanity checks for the new UNet variants, including residual and attention-upsampled models.fixes #4