slimgroup / InvertibleNetworks.jl

A Julia framework for invertible neural networks
MIT License
149 stars 21 forks source link

Change irim block - add invertible UNET #57

Open rafaelorozco opened 2 years ago

rafaelorozco commented 2 years ago

-Changing irim block to generate multiple RBs with different dilations and different hidden channels. This is the proper welling implementation. -This should break some examples. If we are okay with this new block I will go and change all examples to run properly. It is as easy as changing NetworkIRIM(n_in, n_hidden ....)->NetworkIRIM(n_in, [n_hidden], [4];) thus defining a single unet layer with conv dilation 4 which is the current IRIM implementation.

-Add new network invertible unet this is basically a single loop unrolled iteration of irim. Name comes from welling code.
-Directly takes in a precomputed gradient. -meant for inverse problems where your operator is too expensive to use online.

-Doesnt have aggressive memory savings such as inplace conv1x1 yet but should work well with moderately sized 3D. Will be testing this.

codecov[bot] commented 2 years ago

Codecov Report

Base: 88.11% // Head: 87.94% // Decreases project coverage by -0.16% :warning:

Coverage data is based on head (9fb0572) compared to base (304c778). Patch coverage: 91.74% of modified lines in pull request are covered.

:exclamation: Current head 9fb0572 differs from pull request most recent head 34a67dd. Consider uploading reports for the commit 34a67dd to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #57 +/- ## ========================================== - Coverage 88.11% 87.94% -0.17% ========================================== Files 31 32 +1 Lines 2330 2390 +60 ========================================== + Hits 2053 2102 +49 - Misses 277 288 +11 ``` | [Impacted Files](https://codecov.io/gh/slimgroup/InvertibleNetworks.jl/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup) | Coverage Δ | | |---|---|---| | [src/InvertibleNetworks.jl](https://codecov.io/gh/slimgroup/InvertibleNetworks.jl/pull/57/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL0ludmVydGlibGVOZXR3b3Jrcy5qbA==) | `60.00% <ø> (ø)` | | | [src/layers/invertible\_layer\_conv1x1.jl](https://codecov.io/gh/slimgroup/InvertibleNetworks.jl/pull/57/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL2xheWVycy9pbnZlcnRpYmxlX2xheWVyX2NvbnYxeDEuamw=) | `89.37% <ø> (-0.63%)` | :arrow_down: | | [src/networks/invertible\_network\_irim.jl](https://codecov.io/gh/slimgroup/InvertibleNetworks.jl/pull/57/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL25ldHdvcmtzL2ludmVydGlibGVfbmV0d29ya19pcmltLmps) | `91.78% <50.00%> (ø)` | | | [src/layers/invertible\_layer\_irim.jl](https://codecov.io/gh/slimgroup/InvertibleNetworks.jl/pull/57/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL2xheWVycy9pbnZlcnRpYmxlX2xheWVyX2lyaW0uamw=) | `88.46% <91.42%> (-9.69%)` | :arrow_down: | | [src/networks/invertible\_network\_unet.jl](https://codecov.io/gh/slimgroup/InvertibleNetworks.jl/pull/57/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL25ldHdvcmtzL2ludmVydGlibGVfbmV0d29ya191bmV0Lmps) | `93.75% <93.75%> (ø)` | | | [src/layers/layer\_residual\_block.jl](https://codecov.io/gh/slimgroup/InvertibleNetworks.jl/pull/57/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL2xheWVycy9sYXllcl9yZXNpZHVhbF9ibG9jay5qbA==) | `98.75% <100.00%> (+0.06%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.