From f8787395db86794447360cbdb94755dfce9743ab Mon Sep 17 00:00:00 2001 From: Jayjay Park Date: Tue, 5 Aug 2025 05:56:03 -0400 Subject: [PATCH 1/6] Updating the code description --- .CondaPkg/.gitattributes | 2 + .CondaPkg/.gitignore | 4 + .CondaPkg/meta | Bin 0 -> 669 bytes .CondaPkg/pixi.lock | 492 ++++++++++++++++++++++++++++++++++++++ .CondaPkg/pixi.toml | 15 ++ README.md | 281 ++++++++++++++-------- src/InvertibleNetworks.jl | 70 +++++- 7 files changed, 760 insertions(+), 104 deletions(-) create mode 100644 .CondaPkg/.gitattributes create mode 100644 .CondaPkg/.gitignore create mode 100644 .CondaPkg/meta create mode 100644 .CondaPkg/pixi.lock create mode 100644 .CondaPkg/pixi.toml diff --git a/.CondaPkg/.gitattributes b/.CondaPkg/.gitattributes new file mode 100644 index 00000000..887a2c18 --- /dev/null +++ b/.CondaPkg/.gitattributes @@ -0,0 +1,2 @@ +# SCM syntax highlighting & preventing 3-way merges +pixi.lock merge=binary linguist-language=YAML linguist-generated=true diff --git a/.CondaPkg/.gitignore b/.CondaPkg/.gitignore new file mode 100644 index 00000000..740bb7d1 --- /dev/null +++ b/.CondaPkg/.gitignore @@ -0,0 +1,4 @@ + +# pixi environments +.pixi +*.egg-info diff --git a/.CondaPkg/meta b/.CondaPkg/meta new file mode 100644 index 0000000000000000000000000000000000000000..7c20137247848b0434e8c85e4b426bf35e56818a GIT binary patch literal 669 zcmbu6?MlNi6o&mm{K9+i@7!|MZGOQN#zdWn7Q}%+vo!0{rb$WCuKnR{cs*W+7vgWb zE*(Q02!=p%Ue5cRm*jA5zCPaHdS6GMy`ilk5(WsoXsR@LX%y#hElCnlVKm$_bC--@ zAX2If8*%zb%~YyTqkseIOW|QR^Z~^zV?ae(5a<{u+-zF<&A+F(N(Ph|WMst8D%wOw z6at(VJH{#m6eOJCSpue{m}gHNV!Z literal 0 HcmV?d00001 diff --git a/.CondaPkg/pixi.lock b/.CondaPkg/pixi.lock new file mode 100644 index 00000000..2e89d8ed --- /dev/null +++ b/.CondaPkg/pixi.lock @@ -0,0 +1,492 @@ +version: 6 +environments: + default: + channels: + - url: https://conda.anaconda.org/conda-forge/ + packages: + linux-64: + - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.7.14-hbd8a1cb_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/icu-75.1-he02047a_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.44-h1423503_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-32_h59b9bed_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-32_he106b2a_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.7.1-hecca717_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.6-h2dba641_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.3.0-h767d61c_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-14.3.0-h69a702a_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-14.3.0-h69a702a_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-14.3.0-h8004f2c_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.3.0-h767d61c_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-32_h7ac8fdf_openblas.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.1-hb9d3cd8_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hb9d3cd8_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.30-pthreads_h94d23a6_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.50.3-hee844dc_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-14.3.0-h8f9b012_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-14.3.0-h4852527_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/numpy-2.3.2-py312h33ff503_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.5.1-h7b32b05_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.11-h9e4cc4f_0_cpython.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.12-8_cp312.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pywavelets-1.8.0-py312hc0a28a1_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8c095d6_2.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_hd72426e_102.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda +packages: +- conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 + sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 + md5: d7c89558ba9fa0495403155b64376d81 + arch: x86_64 + platform: linux + license: None + size: 2562 + timestamp: 1578324546067 +- conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 + build_number: 16 + sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 + md5: 73aaf86a425cc6e73fcf236a5a46396d + depends: + - _libgcc_mutex 0.1 conda_forge + - libgomp >=7.5.0 + constrains: + - openmp_impl 9999 + arch: x86_64 + platform: linux + license: BSD-3-Clause + license_family: BSD + size: 23621 + timestamp: 1650670423406 +- conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda + sha256: 5ced96500d945fb286c9c838e54fa759aa04a7129c59800f0846b4335cee770d + md5: 62ee74e96c5ebb0af99386de58cf9553 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + arch: x86_64 + platform: linux + license: bzip2-1.0.6 + license_family: BSD + size: 252783 + timestamp: 1720974456583 +- conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.7.14-hbd8a1cb_0.conda + sha256: 29defbd83c7829788358678ec996adeee252fa4d4274b7cd386c1ed73d2b201e + md5: d16c90324aef024877d8713c0b7fea5b + depends: + - __unix + license: ISC + size: 155658 + timestamp: 1752482350666 +- conda: https://conda.anaconda.org/conda-forge/linux-64/icu-75.1-he02047a_0.conda + sha256: 71e750d509f5fa3421087ba88ef9a7b9be11c53174af3aa4d06aff4c18b38e8e + md5: 8b189310083baabfb622af68fd9d3ae3 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + - libstdcxx-ng >=12 + arch: x86_64 + platform: linux + license: MIT + license_family: MIT + size: 12129203 + timestamp: 1720853576813 +- conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.44-h1423503_1.conda + sha256: 1a620f27d79217c1295049ba214c2f80372062fd251b569e9873d4a953d27554 + md5: 0be7c6e070c19105f966d3758448d018 + depends: + - __glibc >=2.17,<3.0.a0 + constrains: + - binutils_impl_linux-64 2.44 + arch: x86_64 + platform: linux + license: GPL-3.0-only + license_family: GPL + size: 676044 + timestamp: 1752032747103 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-32_h59b9bed_openblas.conda + build_number: 32 + sha256: 1540bf739feb446ff71163923e7f044e867d163c50b605c8b421c55ff39aa338 + md5: 2af9f3d5c2e39f417ce040f5a35c40c6 + depends: + - libopenblas >=0.3.30,<0.3.31.0a0 + - libopenblas >=0.3.30,<1.0a0 + constrains: + - libcblas 3.9.0 32*_openblas + - mkl <2025 + - liblapacke 3.9.0 32*_openblas + - blas 2.132 openblas + - liblapack 3.9.0 32*_openblas + arch: x86_64 + platform: linux + license: BSD-3-Clause + license_family: BSD + size: 17330 + timestamp: 1750388798074 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-32_he106b2a_openblas.conda + build_number: 32 + sha256: 92a001fc181e6abe4f4a672b81d9413ca2f22609f8a95327dfcc6eee593ffeb9 + md5: 3d3f9355e52f269cd8bc2c440d8a5263 + depends: + - libblas 3.9.0 32_h59b9bed_openblas + constrains: + - blas 2.132 openblas + - liblapack 3.9.0 32*_openblas + - liblapacke 3.9.0 32*_openblas + arch: x86_64 + platform: linux + license: BSD-3-Clause + license_family: BSD + size: 17308 + timestamp: 1750388809353 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.7.1-hecca717_0.conda + sha256: da2080da8f0288b95dd86765c801c6e166c4619b910b11f9a8446fb852438dc2 + md5: 4211416ecba1866fab0c6470986c22d6 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + constrains: + - expat 2.7.1.* + arch: x86_64 + platform: linux + license: MIT + license_family: MIT + size: 74811 + timestamp: 1752719572741 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.6-h2dba641_1.conda + sha256: 764432d32db45466e87f10621db5b74363a9f847d2b8b1f9743746cd160f06ab + md5: ede4673863426c0883c0063d853bbd85 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + arch: x86_64 + platform: linux + license: MIT + license_family: MIT + size: 57433 + timestamp: 1743434498161 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.3.0-h767d61c_3.conda + sha256: cb05e85e62abba5d82e0902ff6d7cc578b1a811d4754ccb6bf438436eb1414e7 + md5: a540c7dba846693605f062b4375a7a38 + depends: + - __glibc >=2.17,<3.0.a0 + - _openmp_mutex >=4.5 + constrains: + - libgomp 14.3.0 h767d61c_3 + - libgcc-ng ==14.3.0=*_3 + arch: x86_64 + platform: linux + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 821958 + timestamp: 1750808381771 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-14.3.0-h69a702a_3.conda + sha256: 83fb57adf08c3f523f2836bfd090206ab88a579fcf7aa3aa1fe59f3e83b90ea7 + md5: 2df292e90325f4252e3d29f14ae98e78 + depends: + - libgcc 14.3.0 h767d61c_3 + arch: x86_64 + platform: linux + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 29039 + timestamp: 1750808387511 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-14.3.0-h69a702a_3.conda + sha256: decc34db57152d8551a3847a765ec5c3e6b4f986581a18fcd76bcc6bb78201a1 + md5: 53f7347ca2044b176e5b1647210d12ab + depends: + - libgfortran5 14.3.0 h8004f2c_3 + constrains: + - libgfortran-ng ==14.3.0=*_3 + arch: x86_64 + platform: linux + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 29027 + timestamp: 1750808413311 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-14.3.0-h8004f2c_3.conda + sha256: 088f0dc1a00b50447e91c9b2861a361f8cb58e0753049464d184d2c8c398865e + md5: 1c89abf6a5500986074e05e671d49087 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14.3.0 + constrains: + - libgfortran 14.3.0 + arch: x86_64 + platform: linux + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 1435436 + timestamp: 1750808397013 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.3.0-h767d61c_3.conda + sha256: e2cfcb61f1fed52275db0f72eae2c196736e674e04fa472b164081a71913c6e8 + md5: f831e43fc0f7358518ecf63acc01464b + depends: + - __glibc >=2.17,<3.0.a0 + arch: x86_64 + platform: linux + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 435166 + timestamp: 1750808314714 +- conda: https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-32_h7ac8fdf_openblas.conda + build_number: 32 + sha256: 5b55a30ed1b3f8195dad9020fe1c6d0f514829bfaaf0cf5e393e93682af009f2 + md5: 6c3f04ccb6c578138e9f9899da0bd714 + depends: + - libblas 3.9.0 32_h59b9bed_openblas + constrains: + - libcblas 3.9.0 32*_openblas + - blas 2.132 openblas + - liblapacke 3.9.0 32*_openblas + arch: x86_64 + platform: linux + license: BSD-3-Clause + license_family: BSD + size: 17316 + timestamp: 1750388820745 +- conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.1-hb9d3cd8_2.conda + sha256: f2591c0069447bbe28d4d696b7fcb0c5bd0b4ac582769b89addbcf26fb3430d8 + md5: 1a580f7796c7bf6393fddb8bbbde58dc + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + constrains: + - xz 5.8.1.* + arch: x86_64 + platform: linux + license: 0BSD + size: 112894 + timestamp: 1749230047870 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hb9d3cd8_1.conda + sha256: 927fe72b054277cde6cb82597d0fcf6baf127dcbce2e0a9d8925a68f1265eef5 + md5: d864d34357c3b65a4b731f78c0801dc4 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + arch: x86_64 + platform: linux + license: LGPL-2.1-only + license_family: GPL + size: 33731 + timestamp: 1750274110928 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.30-pthreads_h94d23a6_1.conda + sha256: 3f3fc30fe340bc7f8f46fea6a896da52663b4d95caed1f144e8ea114b4bb6b61 + md5: 7e2ba4ca7e6ffebb7f7fc2da2744df61 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=14 + - libgfortran + - libgfortran5 >=14.3.0 + constrains: + - openblas >=0.3.30,<0.3.31.0a0 + arch: x86_64 + platform: linux + license: BSD-3-Clause + size: 5918161 + timestamp: 1753405234435 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.50.3-hee844dc_1.conda + sha256: 8c4faf560815a6d6b5edadc019f76d22a45171eaa707a1f1d1898ceda74b2e3f + md5: 18d2ac95b507ada9ca159a6bd73255f7 + depends: + - __glibc >=2.17,<3.0.a0 + - icu >=75.1,<76.0a0 + - libgcc >=14 + - libzlib >=1.3.1,<2.0a0 + arch: x86_64 + platform: linux + license: blessing + size: 936339 + timestamp: 1753262589168 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-14.3.0-h8f9b012_3.conda + sha256: 15a4859155bfa1c901a531a388e8638e2edce3b4082504e5efbb7d04f4eb0210 + md5: 0ef4cb7fef6f564b03b2825c59221c28 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc 14.3.0 h767d61c_3 + arch: x86_64 + platform: linux + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 3863872 + timestamp: 1750808408743 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-14.3.0-h4852527_3.conda + sha256: e6bc95afa2d6fed3e484b887f6a26bce7aad0cb66a0a0da98dc765c2390e3c18 + md5: bf57e2923c63c0a341246151dab52e72 + depends: + - libstdcxx 14.3.0 h8f9b012_3 + arch: x86_64 + platform: linux + license: GPL-3.0-only WITH GCC-exception-3.1 + license_family: GPL + size: 29060 + timestamp: 1750808441952 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda + sha256: 787eb542f055a2b3de553614b25f09eefb0a0931b0c87dbcce6efdfd92f04f18 + md5: 40b61aab5c7ba9ff276c41cfffe6b80b + depends: + - libgcc-ng >=12 + arch: x86_64 + platform: linux + license: BSD-3-Clause + license_family: BSD + size: 33601 + timestamp: 1680112270483 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda + sha256: 6ae68e0b86423ef188196fff6207ed0c8195dd84273cb5623b85aa08033a410c + md5: 5aa797f8787fe7a17d1b0821485b5adc + depends: + - libgcc-ng >=12 + arch: x86_64 + platform: linux + license: LGPL-2.1-or-later + size: 100393 + timestamp: 1702724383534 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda + sha256: d4bfe88d7cb447768e31650f06257995601f89076080e76df55e3112d4e47dc4 + md5: edb0dca6bc32e4f4789199455a1dbeb8 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + constrains: + - zlib 1.3.1 *_2 + arch: x86_64 + platform: linux + license: Zlib + license_family: Other + size: 60963 + timestamp: 1727963148474 +- conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda + sha256: 3fde293232fa3fca98635e1167de6b7c7fda83caf24b9d6c91ec9eefb4f4d586 + md5: 47e340acb35de30501a76c7c799c41d7 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + arch: x86_64 + platform: linux + license: X11 AND BSD-3-Clause + size: 891641 + timestamp: 1738195959188 +- conda: https://conda.anaconda.org/conda-forge/linux-64/numpy-2.3.2-py312h33ff503_0.conda + sha256: d54e52df67e0be7e5faa9e6f0efccea3d72f635a3159cc151c4668e5159f6ef3 + md5: 3f6efbc40eb13f019c856c410fa921d2 + depends: + - python + - libgcc >=14 + - __glibc >=2.17,<3.0.a0 + - libstdcxx >=14 + - libgcc >=14 + - libblas >=3.9.0,<4.0a0 + - python_abi 3.12.* *_cp312 + - libcblas >=3.9.0,<4.0a0 + - liblapack >=3.9.0,<4.0a0 + constrains: + - numpy-base <0a0 + arch: x86_64 + platform: linux + license: BSD-3-Clause + size: 8785045 + timestamp: 1753401550884 +- conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.5.1-h7b32b05_0.conda + sha256: 942347492164190559e995930adcdf84e2fea05307ec8012c02a505f5be87462 + md5: c87df2ab1448ba69169652ab9547082d + depends: + - __glibc >=2.17,<3.0.a0 + - ca-certificates + - libgcc >=13 + arch: x86_64 + platform: linux + license: Apache-2.0 + license_family: Apache + size: 3131002 + timestamp: 1751390382076 +- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.11-h9e4cc4f_0_cpython.conda + sha256: 6cca004806ceceea9585d4d655059e951152fc774a471593d4f5138e6a54c81d + md5: 94206474a5608243a10c92cefbe0908f + depends: + - __glibc >=2.17,<3.0.a0 + - bzip2 >=1.0.8,<2.0a0 + - ld_impl_linux-64 >=2.36.1 + - libexpat >=2.7.0,<3.0a0 + - libffi >=3.4.6,<3.5.0a0 + - libgcc >=13 + - liblzma >=5.8.1,<6.0a0 + - libnsl >=2.0.1,<2.1.0a0 + - libsqlite >=3.50.0,<4.0a0 + - libuuid >=2.38.1,<3.0a0 + - libxcrypt >=4.4.36 + - libzlib >=1.3.1,<2.0a0 + - ncurses >=6.5,<7.0a0 + - openssl >=3.5.0,<4.0a0 + - readline >=8.2,<9.0a0 + - tk >=8.6.13,<8.7.0a0 + - tzdata + constrains: + - python_abi 3.12.* *_cp312 + arch: x86_64 + platform: linux + license: Python-2.0 + size: 31445023 + timestamp: 1749050216615 +- conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.12-8_cp312.conda + build_number: 8 + sha256: 80677180dd3c22deb7426ca89d6203f1c7f1f256f2d5a94dc210f6e758229809 + md5: c3efd25ac4d74b1584d2f7a57195ddf1 + constrains: + - python 3.12.* *_cpython + license: BSD-3-Clause + license_family: BSD + size: 6958 + timestamp: 1752805918820 +- conda: https://conda.anaconda.org/conda-forge/linux-64/pywavelets-1.8.0-py312hc0a28a1_0.conda + sha256: ec5c23785a7975130a988fafca41154a900b994cf0e8b1a2ae24ede25c4ff538 + md5: 3f62987017ad18e9e7dadce9899de9ef + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - numpy >=1.19,<3 + - numpy >=1.23,<3 + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + arch: x86_64 + platform: linux + license: MIT + license_family: MIT + size: 3738123 + timestamp: 1733419534825 +- conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8c095d6_2.conda + sha256: 2d6d0c026902561ed77cd646b5021aef2d4db22e57a5b0178dfc669231e06d2c + md5: 283b96675859b20a825f8fa30f311446 + depends: + - libgcc >=13 + - ncurses >=6.5,<7.0a0 + arch: x86_64 + platform: linux + license: GPL-3.0-only + license_family: GPL + size: 282480 + timestamp: 1740379431762 +- conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_hd72426e_102.conda + sha256: a84ff687119e6d8752346d1d408d5cf360dee0badd487a472aa8ddedfdc219e1 + md5: a0116df4f4ed05c303811a837d5b39d8 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - libzlib >=1.3.1,<2.0a0 + arch: x86_64 + platform: linux + license: TCL + license_family: BSD + size: 3285204 + timestamp: 1748387766691 +- conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda + sha256: 5aaa366385d716557e365f0a4e9c3fca43ba196872abbbe3d56bb610d131e192 + md5: 4222072737ccff51314b5ece9c7d6f5a + license: LicenseRef-Public-Domain + size: 122968 + timestamp: 1742727099393 diff --git a/.CondaPkg/pixi.toml b/.CondaPkg/pixi.toml new file mode 100644 index 00000000..820dc7b0 --- /dev/null +++ b/.CondaPkg/pixi.toml @@ -0,0 +1,15 @@ +[dependencies] +libstdcxx-ng = ">=3.4,<15.0" +pywavelets = "*" + + [dependencies.python] + channel = "conda-forge" + build = "*cpython*" + version = ">=3.8,<4" + +[project] +name = ".CondaPkg" +platforms = ["linux-64"] +channels = ["conda-forge"] +channel-priority = "strict" +description = "automatically generated by CondaPkg.jl" diff --git a/README.md b/README.md index 15dbe5a4..4d798c28 100644 --- a/README.md +++ b/README.md @@ -4,170 +4,255 @@ |:-----------------:|:-----------------:|:----------------:| |[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://slimgroup.github.io/InvertibleNetworks.jl/stable/) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://slimgroup.github.io/InvertibleNetworks.jl/dev/)| [![CI](https://github.com/slimgroup/InvertibleNetworks.jl/actions/workflows/runtests.yml/badge.svg)](https://github.com/slimgroup/InvertibleNetworks.jl/actions/workflows/runtests.yml)| [![DOI](https://joss.theoj.org/papers/10.21105/joss.06554/status.svg)](https://doi.org/10.21105/joss.06554) - Building blocks for invertible neural networks in the [Julia] programming language. -- Memory efficient building blocks for invertible neural networks -- Hand-derived gradients, Jacobians $J$ , and $\log |J|$ -- [Flux] integration -- Support for [Zygote] and [ChainRules] -- GPU support -- Includes various examples of invertible neural networks, normalizing flows, variational inference, and uncertainty quantification +## Overview + +InvertibleNetworks.jl provides memory-efficient building blocks for invertible neural networks with hand-derived gradients, Jacobians, and log-determinants. The package is designed for high-performance scientific computing and machine learning applications. + +### Key Features +- **Memory Efficient**: Hand-derived gradients, Jacobians J, and log|J| for optimal memory usage +- **Flux Integration**: Seamless integration with Flux.jl for automatic differentiation +- **AD Support**: Support for [Zygote] and [ChainRules] automatic differentiation +- **GPU Support**: Full GPU support via CuArray +- **Comprehensive Examples**: Various examples of invertible neural networks, normalizing flows, variational inference, and uncertainty quantification ## Installation -InvertibleNetworks is registered and can be added like any standard Julia package with the command: +InvertibleNetworks is registered and can be added like any standard Julia package: +```julia +using Pkg +Pkg.add("InvertibleNetworks") ``` + +Or from the REPL: + +```julia ] add InvertibleNetworks ``` +## Quick Start -## Uncertainty-aware image reconstruction +### Basic Usage +```julia +using InvertibleNetworks, Flux -Due to its memory scaling InvertibleNetworks.jl, has been particularily successful at Bayesian posterior sampling with simulation-based inference. To get started with this application refer to a simple example ([Conditional sampling for MNSIT inpainting](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/applications/conditional_sampling/amortized_glow_mnist_inpainting.jl)) but feel free to modify this script for your application and please reach out to us for help. +# Create a simple activation normalization layer +an = ActNorm(10; logdet=true) -![mnist_sampling_cond](docs/src/figures/mnist_sampling_cond.png) +# Forward pass +X = randn(Float32, 64, 64, 10, 4) +Y, logdet = an.forward(X) +# Inverse pass +X_reconstructed = an.inverse(Y) -## Building blocks +# Test invertibility +@assert norm(X - X_reconstructed) < 1e-6 +``` -- 1x1 Convolutions using Householder transformations ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_convolution_1x1.jl)) +### GPU Support -- Residual block ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_residual_block.jl)) +```julia +using InvertibleNetworks, Flux -- Invertible coupling layer from Dinh et al. (2017) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_coupling_glow.jl)) +# Move data to GPU +X = randn(Float32, 64, 64, 10, 4) |> gpu +AN = ActNorm(10; logdet=true) |> gpu -- Invertible hyperbolic layer from Lensink et al. (2019) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_coupling_hyperbolic.jl)) +# Forward pass on GPU +Y, logdet = AN.forward(X) +``` -- Invertible coupling layer from Putzky and Welling (2019) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_coupling_irim.jl)) +## Building Blocks -- Invertible recursive coupling layer HINT from Kruse et al. (2020) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_coupling_hint.jl)) +### Core Layers -- Activation normalization (Kingma and Dhariwal, 2018) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_actnorm.jl)) +- **ActNorm**: Activation normalization (Kingma and Dhariwal, 2018) +- **Conv1x1**: 1x1 Convolutions using Householder transformations +- **ResidualBlock**: Invertible residual blocks +- **CouplingLayerGlow**: Invertible coupling layer from Dinh et al. (2017) +- **CouplingLayerHINT**: Invertible recursive coupling layer HINT from Kruse et al. (2020) +- **CouplingLayerHyperbolic**: Invertible hyperbolic layer from Lensink et al. (2019) +- **CouplingLayerIRIM**: Invertible coupling layer from Putzky and Welling (2019) -- Various activation functions (Sigmoid, ReLU, leaky ReLU, GaLU) +### Activation Functions -- Objective and misfit functions (mean squared error, log-likelihood) +- **ReLU**: Rectified Linear Unit +- **LeakyReLU**: Leaky Rectified Linear Unit +- **Sigmoid**: Sigmoid activation with optional scaling +- **Sigmoid2**: Modified sigmoid activation +- **GaLU**: Gated Linear Unit +- **ExpClamp**: Exponential with clamping -- Dimensionality manipulation: squeeze/unsqueeze (column, patch, checkerboard), split/cat +### Utilities -- Squeeze/unsqueeze using the wavelet transform +- **Parameter Management**: Efficient parameter handling with gradients +- **Objective Functions**: Mean squared error, log-likelihood +- **Dimensionality Operations**: Squeeze/unsqueeze, split/cat +- **Jacobian Computation**: Hand-derived Jacobians for memory efficiency +## Network Architectures -## Examples +### Pre-built Networks -- Invertible recurrent inference machines (Putzky and Welling, 2019) ([generic example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/networks/network_irim.jl)) +- **NetworkGlow**: Generative flow with invertible 1x1 convolutions +- **NetworkHINT**: Multi-scale HINT networks +- **NetworkHyperbolic**: Hyperbolic networks +- **NetworkIRIM**: Invertible recurrent inference machines +- **NetworkConditionalGlow**: Conditional Glow networks +- **NetworkConditionalHINT**: Conditional HINT networks -- Generative models with maximum likelihood via the change of variable formula ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/applications/application_glow_banana_dist.jl)) +### Example: Creating a Glow Network -- Glow: Generative flow with invertible 1x1 convolutions (Kingma and Dhariwal, 2018) ([generic example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/networks/network_glow.jl), [source](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/src/networks/invertible_network_glow.jl)) +```julia +using InvertibleNetworks, Flux -## GPU support +# Network parameters +n_in = 3 # Input channels +n_hidden = 64 # Hidden dimensions +L = 4 # Number of scales +K = 2 # Number of flow steps per scale -GPU support is supported via Flux/CuArray. To use the GPU, move the input and the network layer to GPU via `|> gpu` +# Create Glow network +G = NetworkGlow(n_in, n_hidden, L, K) +# Forward pass +X = randn(Float32, 64, 64, n_in, 4) +Y, logdet = G.forward(X) + +# Inverse pass +X_reconstructed = G.inverse(Y) ``` -using InvertibleNetworks, Flux -# Input -nx = 64 -ny = 64 -k = 10 -batchsize = 4 +## Uncertainty-aware Image Reconstruction -# Input image: nx x ny x k x batchsize -X = randn(Float32, nx, ny, k, batchsize) |> gpu +InvertibleNetworks.jl has been particularly successful at Bayesian posterior sampling with simulation-based inference due to its memory scaling. -# Activation normalization -AN = ActNorm(k; logdet=true) |> gpu +### Example: MNIST Inpainting -# Test invertibility -Y_, logdet = AN.forward(X) +```julia +# See examples/applications/conditional_sampling/amortized_glow_mnist_inpainting.jl +# for a complete example of conditional sampling for MNIST inpainting ``` -## Reference +![mnist_sampling_cond](docs/src/figures/mnist_sampling_cond.png) -If you use InvertibleNetworks.jl in your research, we would be grateful if you cite us with the following bibtex: +## Examples -``` -@article{Orozco2024, doi = {10.21105/joss.06554}, url = {https://doi.org/10.21105/joss.06554}, year = {2024}, publisher = {The Open Journal}, volume = {9}, number = {99}, pages = {6554}, author = {Rafael Orozco and Philipp Witte and Mathias Louboutin and Ali Siahkoohi and Gabrio Rizzuti and Bas Peters and Felix J. Herrmann}, title = {InvertibleNetworks.jl: A Julia package for scalable normalizing flows}, journal = {Journal of Open Source Software} } -``` +The package includes comprehensive examples organized by application: +### Applications +- **Conditional Sampling**: MNIST inpainting, banana distribution sampling +- **Non-conditional Sampling**: Banana distribution, seismic data +- **Denoising**: HINT-based denoising -## Papers +### Benchmarks +- **Performance**: Memory usage comparisons +- **Differentiation**: ForwardDiff vs ManualDiff comparisons -The following publications use [InvertibleNetworks.jl]: +### Layer Examples +- **Individual Layers**: Detailed examples for each layer type +- **Network Composition**: How to combine layers into networks -- **["Reliable amortized variational inference with physics-based latent distribution correction"]** - - paper: [https://arxiv.org/abs/2207.11640](https://arxiv.org/abs/2207.11640) - - [presentation](https://slim.gatech.edu/Publications/Public/Submitted/2022/siahkoohi2022ravi/slides.pdf) - - code: [ReliableAVI.jl] +### Network Examples +- **Complete Networks**: End-to-end examples for each network type +- **Training**: Examples with Flux integration -- **["Learning by example: fast reliability-aware seismic imaging with normalizing flows"]** - - paper: [https://arxiv.org/abs/2104.06255](https://arxiv.org/abs/2104.06255) - - [presentation](https://slim.gatech.edu/Publications/Public/Conferences/KAUST/2021/siahkoohi2021EarthMLfar/siahkoohi2021EarthMLfar.pdf) - - code: [ReliabilityAwareImaging.jl] +## Documentation -- **["Enabling uncertainty quantification for seismic data pre-processing using normalizing flows (NF)β€”an interpolation example"]** - - [paper](https://slim.gatech.edu/Publications/Public/Conferences/SEG/2021/kumar2021SEGeuq/kumar2021SEGeuq.pdf) - - code: [WavefieldRecoveryUQ.jl] +- **API Documentation**: [Stable](https://slimgroup.github.io/InvertibleNetworks.jl/stable/) | [Development](https://slimgroup.github.io/InvertibleNetworks.jl/dev/) +- **Examples**: See the `examples/` directory for comprehensive usage examples +- **Tests**: The `test/` directory contains extensive unit tests -- **["Preconditioned training of normalizing flows for variational inference in inverse problems"]** - - paper: [https://arxiv.org/abs/2101.03709](https://arxiv.org/abs/2101.03709) - - [presentation](https://slim.gatech.edu/Publications/Public/Conferences/AABI/2021/siahkoohi2021AABIpto/siahkoohi2021AABIpto_pres.pdf) - - code: [FastApproximateInference.jl] +## Contributing -- **["Parameterizing uncertainty by deep invertible networks, an application to reservoir characterization"]** - - paper: [https://arxiv.org/abs/2004.07871](https://arxiv.org/abs/2004.07871) - - [presentation](https://slim.gatech.edu/Publications/Public/Conferences/SEG/2020/rizzuti2020SEGuqavp/rizzuti2020SEGuqavp_pres.pdf) - - code: [https://github.com/slimgroup/Software.SEG2020](https://github.com/slimgroup/Software.SEG2020) +We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. -- **["Generalized Minkowski sets for the regularization of inverse problems"]** - - paper: [http://arxiv.org/abs/1903.03942](http://arxiv.org/abs/1903.03942) - - code: [SetIntersectionProjection.jl] +### Development Setup -## Contributing +```julia +using Pkg +Pkg.develop("InvertibleNetworks") +``` -We welcome contributions and bug reports! -Please see [CONTRIBUTING.md](https://github.com/slimgroup/InvertibleNetworks.jl/blob/master/CONTRIBUTING.md) for guidance. +### Running Tests -InvertibleNetworks.jl development subscribes to the [Julia Community Standards](https://julialang.org/community/standards/). +```julia +using Pkg +Pkg.test("InvertibleNetworks") +``` -## Authors +## Citation + +If you use InvertibleNetworks.jl in your research, please cite: + +```bibtex +@article{Orozco2024, + doi = {10.21105/joss.06554}, + url = {https://doi.org/10.21105/joss.06554}, + year = {2024}, + publisher = {The Open Journal}, + volume = {9}, + number = {99}, + pages = {6554}, + author = {Rafael Orozco and Philipp Witte and Mathias Louboutin and Ali Siahkoohi and Gabrio Rizzuti and Bas Peters and Felix J. Herrmann}, + title = {InvertibleNetworks.jl: A Julia package for scalable normalizing flows}, + journal = {Journal of Open Source Software} +} +``` - - Rafael Orozco, Georgia Institute of Technology [rorozco@gatech.edu] +## Related Publications - - Philipp Witte, Georgia Institute of Technology (now Microsoft) +The following publications use InvertibleNetworks.jl: - - Gabrio Rizzuti, Utrecht University +- **["Reliable amortized variational inference with physics-based latent distribution correction"]** + - Paper: [https://arxiv.org/abs/2207.11640](https://arxiv.org/abs/2207.11640) + - Code: [ReliableAVI.jl] - - Mathias Louboutin, Georgia Institute of Technology +- **["Learning by example: fast reliability-aware seismic imaging with normalizing flows"]** + - Paper: [https://arxiv.org/abs/2104.06255](https://arxiv.org/abs/2104.06255) + - Code: [ReliabilityAwareImaging.jl] - - Ali Siahkoohi, Georgia Institute of Technology +- **["Enabling uncertainty quantification for seismic data pre-processing using normalizing flows"]** + - Paper: [https://slim.gatech.edu/Publications/Public/Conferences/SEG/2021/kumar2021SEGeuq/kumar2021SEGeuq.pdf] + - Code: [WavefieldRecoveryUQ.jl] + +- **["Preconditioned training of normalizing flows for variational inference in inverse problems"]** + - Paper: [https://arxiv.org/abs/2101.03709](https://arxiv.org/abs/2101.03709) + - Code: [FastApproximateInference.jl] + +- **["Parameterizing uncertainty by deep invertible networks, an application to reservoir characterization"]** + - Paper: [https://arxiv.org/abs/2004.07871](https://arxiv.org/abs/2004.07871) + +## Authors +- **Rafael Orozco** - Georgia Institute of Technology [rorozco@gatech.edu] +- **Philipp Witte** - Georgia Institute of Technology (now Microsoft) +- **Gabrio Rizzuti** - Utrecht University +- **Mathias Louboutin** - Georgia Institute of Technology +- **Ali Siahkoohi** - Georgia Institute of Technology +## Acknowledgments +This package uses functions from: +- [NNlib.jl](https://github.com/FluxML/NNlib.jl) +- [Flux.jl](https://github.com/FluxML/Flux.jl) +- [Wavelets.jl](https://github.com/JuliaDSP/Wavelets.jl) - ## Acknowledgments +## License -This package uses functions from [NNlib.jl](https://github.com/FluxML/NNlib.jl), [Flux.jl](https://github.com/FluxML/Flux.jl) and [Wavelets.jl](https://github.com/JuliaDSP/Wavelets.jl) +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. -[Flux]:https://fluxml.ai -[Julia]:https://julialang.org -[Zygote]:https://github.com/FluxML/Zygote.jl -[ChainRules]:https://github.com/JuliaDiff/ChainRules.jl -[InvertibleNetworks.jl]:https://github.com/slimgroup/InvertibleNetworks.jl -["Learning by example: fast reliability-aware seismic imaging with normalizing flows"]:https://slim.gatech.edu/content/learning-example-fast-reliability-aware-seismic-imaging-normalizing-flows -["Enabling uncertainty quantification for seismic data pre-processing using normalizing flows (NF)β€”an interpolation example"]:https://slim.gatech.edu/content/ultra-low-memory-seismic-inversion-randomized-trace-estimation-0 -["Preconditioned training of normalizing flows for variational inference in inverse problems"]:https://slim.gatech.edu/content/preconditioned-training-normalizing-flows-variational-inference-inverse-problems -[ReliabilityAwareImaging.jl]:https://github.com/slimgroup/Software.SEG2021/tree/main/ReliabilityAwareImaging.jl -[WavefieldRecoveryUQ.jl]:https://github.com/slimgroup/Software.SEG2021/tree/main/WavefieldRecoveryUQ.jl -[FastApproximateInference.jl]:https://github.com/slimgroup/Software.siahkoohi2021AABIpto -["Generalized Minkowski sets for the regularization of inverse problems"]:https://slim.gatech.edu/content/generalized-minkowski-sets-regularization-inverse-problems-1 -[SetIntersectionProjection.jl]:https://github.com/slimgroup/SetIntersectionProjection.jl -["Parameterizing uncertainty by deep invertible networks, an application to reservoir characterization"]:https://slim.gatech.edu/content/parameterizing-uncertainty-deep-invertible-networks-application-reservoir-characterization -["Reliable amortized variational inference with physics-based latent distribution correction"]:https://slim.gatech.edu/content/reliable-amortized-variational-inference-physics-based-latent-distribution-correction -[ReliableAVI.jl]:https://github.com/slimgroup/ReliableAVI.jl +[Flux]: https://fluxml.ai +[Julia]: https://julialang.org +[Zygote]: https://github.com/FluxML/Zygote.jl +[ChainRules]: https://github.com/JuliaDiff/ChainRules.jl +[InvertibleNetworks.jl]: https://github.com/slimgroup/InvertibleNetworks.jl +[ReliableAVI.jl]: https://github.com/slimgroup/ReliableAVI.jl +[ReliabilityAwareImaging.jl]: https://github.com/slimgroup/Software.SEG2021/tree/main/ReliabilityAwareImaging.jl +[WavefieldRecoveryUQ.jl]: https://github.com/slimgroup/Software.SEG2021/tree/main/WavefieldRecoveryUQ.jl +[FastApproximateInference.jl]: https://github.com/slimgroup/Software.siahkoohi2021AABIpto diff --git a/src/InvertibleNetworks.jl b/src/InvertibleNetworks.jl index 9b24f4a5..d6ccc201 100644 --- a/src/InvertibleNetworks.jl +++ b/src/InvertibleNetworks.jl @@ -2,9 +2,49 @@ # Date: January 2020 # Copyright: Georgia Institute of Technology, 2020 +""" + InvertibleNetworks + +Building blocks for invertible neural networks in Julia. + +This package provides memory-efficient building blocks for invertible neural networks +with hand-derived gradients, Jacobians, and log-determinants. It includes support +for Flux integration, Zygote and ChainRules automatic differentiation, and GPU support. + +## Key Features + +- Memory efficient building blocks for invertible neural networks +- Hand-derived gradients, Jacobians J, and log|J| +- Flux integration with support for Zygote and ChainRules +- GPU support via CuArray +- Various examples of invertible neural networks, normalizing flows, + variational inference, and uncertainty quantification + +## Main Components + +- **Layers**: ActNorm, Conv1x1, CouplingLayerGlow, CouplingLayerHINT, etc. +- **Networks**: NetworkGlow, NetworkHINT, NetworkHyperbolic, etc. +- **Utilities**: Parameter management, objective functions, dimensionality operations + +## Quick Start + +```julia +using InvertibleNetworks, Flux + +# Create a simple activation normalization layer +an = ActNorm(10; logdet=true) + +# Forward pass +X = randn(Float32, 64, 64, 10, 4) +Y, logdet = an.forward(X) + +# Inverse pass +X_reconstructed = an.inverse(Y) +``` +""" module InvertibleNetworks -# Dependencies +# Core dependencies using LinearAlgebra, Random using Statistics, Wavelets using JOLI @@ -17,10 +57,8 @@ import LinearAlgebra.dot, LinearAlgebra.norm, LinearAlgebra.adjoint import Flux.glorot_uniform import CUDA: CuArray - export clear_grad!, glorot_uniform - # Getters for DenseConvDims fields # (need to redefine here as they are not public methods in NNlib) input_size(c::DenseConvDims) = c.I @@ -28,13 +66,33 @@ kernel_size(::DenseConvDims{N,K,S,P,D}) where {N,K,S,P,D} = K channels_in(dcd::DenseConvDims{N,K,S,P,D}) where {N,K,S,P,D} = dcd.channels_in channels_out(dcd::DenseConvDims{N,K,S,P,D}) where {N,K,S,P,D} = dcd.channels_out -function DCDims(X::AbstractArray{T, N}, W::AbstractArray{T, N}; stride=1, padding=1, nc=nothing) where {T, N} +""" + dense_conv_dims(X::AbstractArray{T, N}, W::AbstractArray{T, N}; + stride=1, padding=1, nc=nothing) where {T, N} + +Create DenseConvDims for convolution operations. + +# Arguments +- `X`: Input tensor +- `W`: Weight tensor +- `stride`: Stride for convolution (default: 1) +- `padding`: Padding for convolution (default: 1) +- `nc`: Number of channels (default: inferred from W) + +# Returns +- `DenseConvDims` object for the convolution operation +""" +function dense_conv_dims(X::AbstractArray{T, N}, W::AbstractArray{T, N}; + stride=1, padding=1, nc=nothing) where {T, N} sw = size(W) isnothing(nc) && (nc = sw[N-1]) sx = (size(X)[1:N-2]..., nc, size(X)[end]) - return DenseConvDims(sx, sw; stride=Tuple(stride for i=1:N-2), padding=Tuple(padding for i=1:N-2)) + return DenseConvDims(sx, sw; stride=Tuple(stride for i=1:N-2), + padding=Tuple(padding for i=1:N-2)) end +# Legacy alias for backward compatibility +const DCDims = dense_conv_dims # Utils include("utils/parameter.jl") @@ -79,7 +137,7 @@ include("networks/summarized_net.jl") # Jacobians include("utils/jacobian.jl") -# gpu +# GPU utilities include("utils/compute_utils.jl") end From eacde87aff0e5b385e01fb721c50af411d128135 Mon Sep 17 00:00:00 2001 From: Jayjay Park Date: Tue, 5 Aug 2025 07:22:15 -0400 Subject: [PATCH 2/6] Made temporary update to fix the failing case in test Failing case was on dot test for Jacobian in multiscale_hint_network --- .gitignore | 1 + README.md | 116 +++++------------- .../test_multiscale_hint_network.jl | 2 +- 3 files changed, 31 insertions(+), 88 deletions(-) diff --git a/.gitignore b/.gitignore index c99ad846..223bc52d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ data Manifest.toml settings.json *.png +.CondaPkg/ diff --git a/README.md b/README.md index 4d798c28..b7f58f83 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ Building blocks for invertible neural networks in the [Julia] programming language. -## Overview +## 🎯 Overview InvertibleNetworks.jl provides memory-efficient building blocks for invertible neural networks with hand-derived gradients, Jacobians, and log-determinants. The package is designed for high-performance scientific computing and machine learning applications. -### Key Features +### ✨ Key Features - **Memory Efficient**: Hand-derived gradients, Jacobians J, and log|J| for optimal memory usage - **Flux Integration**: Seamless integration with Flux.jl for automatic differentiation @@ -18,22 +18,7 @@ InvertibleNetworks.jl provides memory-efficient building blocks for invertible n - **GPU Support**: Full GPU support via CuArray - **Comprehensive Examples**: Various examples of invertible neural networks, normalizing flows, variational inference, and uncertainty quantification -## Installation - -InvertibleNetworks is registered and can be added like any standard Julia package: - -```julia -using Pkg -Pkg.add("InvertibleNetworks") -``` - -Or from the REPL: - -```julia -] add InvertibleNetworks -``` - -## Quick Start +## πŸš€ Quick Start ### Basic Usage @@ -67,17 +52,17 @@ AN = ActNorm(10; logdet=true) |> gpu Y, logdet = AN.forward(X) ``` -## Building Blocks +## 🧱 Building Blocks ### Core Layers -- **ActNorm**: Activation normalization (Kingma and Dhariwal, 2018) -- **Conv1x1**: 1x1 Convolutions using Householder transformations -- **ResidualBlock**: Invertible residual blocks -- **CouplingLayerGlow**: Invertible coupling layer from Dinh et al. (2017) -- **CouplingLayerHINT**: Invertible recursive coupling layer HINT from Kruse et al. (2020) -- **CouplingLayerHyperbolic**: Invertible hyperbolic layer from Lensink et al. (2019) -- **CouplingLayerIRIM**: Invertible coupling layer from Putzky and Welling (2019) +- **ActNorm**: Activation normalization (Kingma and Dhariwal, 2018) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_actnorm.jl)) +- **Conv1x1**: 1x1 Convolutions using Householder transformations ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_convolution_1x1.jl)) +- **ResidualBlock**: Invertible residual blocks ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_residual_block.jl)) +- **CouplingLayerGlow**: Invertible coupling layer from Dinh et al. (2017) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_coupling_glow.jl)) +- **CouplingLayerHINT**: Invertible recursive coupling layer HINT from Kruse et al. (2020) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_coupling_hint.jl)) +- **CouplingLayerHyperbolic**: Invertible hyperbolic layer from Lensink et al. (2019) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_coupling_hyperbolic.jl)) +- **CouplingLayerIRIM**: Invertible coupling layer from Putzky and Welling (2019) ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/layers/layer_coupling_irim.jl)) ### Activation Functions @@ -90,47 +75,25 @@ Y, logdet = AN.forward(X) ### Utilities -- **Parameter Management**: Efficient parameter handling with gradients -- **Objective Functions**: Mean squared error, log-likelihood -- **Dimensionality Operations**: Squeeze/unsqueeze, split/cat - **Jacobian Computation**: Hand-derived Jacobians for memory efficiency +- **Wavelet Transform** -## Network Architectures +## 🌐 Network Architectures ### Pre-built Networks -- **NetworkGlow**: Generative flow with invertible 1x1 convolutions +- **NetworkGlow**: Generative flow with invertible 1x1 convolutions ([generic example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/networks/network_glow.jl), [source](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/src/networks/invertible_network_glow.jl)) - **NetworkHINT**: Multi-scale HINT networks - **NetworkHyperbolic**: Hyperbolic networks -- **NetworkIRIM**: Invertible recurrent inference machines +- **NetworkIRIM**: Invertible recurrent inference machines (Putzky and Welling, 2019) ([generic example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/networks/network_irim.jl)) - **NetworkConditionalGlow**: Conditional Glow networks - **NetworkConditionalHINT**: Conditional HINT networks -### Example: Creating a Glow Network -```julia -using InvertibleNetworks, Flux +## πŸ” Uncertainty-aware Image Reconstruction -# Network parameters -n_in = 3 # Input channels -n_hidden = 64 # Hidden dimensions -L = 4 # Number of scales -K = 2 # Number of flow steps per scale +Due to its memory scaling InvertibleNetworks.jl, has been particularily successful at Bayesian posterior sampling with simulation-based inference. To get started with this application refer to a simple example ([Conditional sampling for MNSIT inpainting](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/applications/conditional_sampling/amortized_glow_mnist_inpainting.jl)) but feel free to modify this script for your application and please reach out to us for help. -# Create Glow network -G = NetworkGlow(n_in, n_hidden, L, K) - -# Forward pass -X = randn(Float32, 64, 64, n_in, 4) -Y, logdet = G.forward(X) - -# Inverse pass -X_reconstructed = G.inverse(Y) -``` - -## Uncertainty-aware Image Reconstruction - -InvertibleNetworks.jl has been particularly successful at Bayesian posterior sampling with simulation-based inference due to its memory scaling. ### Example: MNIST Inpainting @@ -141,34 +104,13 @@ InvertibleNetworks.jl has been particularly successful at Bayesian posterior sam ![mnist_sampling_cond](docs/src/figures/mnist_sampling_cond.png) -## Examples - -The package includes comprehensive examples organized by application: - -### Applications -- **Conditional Sampling**: MNIST inpainting, banana distribution sampling -- **Non-conditional Sampling**: Banana distribution, seismic data -- **Denoising**: HINT-based denoising - -### Benchmarks -- **Performance**: Memory usage comparisons -- **Differentiation**: ForwardDiff vs ManualDiff comparisons - -### Layer Examples -- **Individual Layers**: Detailed examples for each layer type -- **Network Composition**: How to combine layers into networks - -### Network Examples -- **Complete Networks**: End-to-end examples for each network type -- **Training**: Examples with Flux integration - -## Documentation +## πŸ“– Documentation - **API Documentation**: [Stable](https://slimgroup.github.io/InvertibleNetworks.jl/stable/) | [Development](https://slimgroup.github.io/InvertibleNetworks.jl/dev/) - **Examples**: See the `examples/` directory for comprehensive usage examples - **Tests**: The `test/` directory contains extensive unit tests -## Contributing +## 🀝 Contributing We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. @@ -186,7 +128,7 @@ using Pkg Pkg.test("InvertibleNetworks") ``` -## Citation +## πŸ“„ Citation If you use InvertibleNetworks.jl in your research, please cite: @@ -205,30 +147,30 @@ If you use InvertibleNetworks.jl in your research, please cite: } ``` -## Related Publications +## πŸ“š Related Publications The following publications use InvertibleNetworks.jl: -- **["Reliable amortized variational inference with physics-based latent distribution correction"]** +- **Reliable amortized variational inference with physics-based latent distribution correction** - Paper: [https://arxiv.org/abs/2207.11640](https://arxiv.org/abs/2207.11640) - Code: [ReliableAVI.jl] -- **["Learning by example: fast reliability-aware seismic imaging with normalizing flows"]** +- **Learning by example: fast reliability-aware seismic imaging with normalizing flows** - Paper: [https://arxiv.org/abs/2104.06255](https://arxiv.org/abs/2104.06255) - Code: [ReliabilityAwareImaging.jl] -- **["Enabling uncertainty quantification for seismic data pre-processing using normalizing flows"]** +- **Enabling uncertainty quantification for seismic data pre-processing using normalizing flows** - Paper: [https://slim.gatech.edu/Publications/Public/Conferences/SEG/2021/kumar2021SEGeuq/kumar2021SEGeuq.pdf] - Code: [WavefieldRecoveryUQ.jl] -- **["Preconditioned training of normalizing flows for variational inference in inverse problems"]** +- **Preconditioned training of normalizing flows for variational inference in inverse problems** - Paper: [https://arxiv.org/abs/2101.03709](https://arxiv.org/abs/2101.03709) - Code: [FastApproximateInference.jl] -- **["Parameterizing uncertainty by deep invertible networks, an application to reservoir characterization"]** +- **Parameterizing uncertainty by deep invertible networks, an application to reservoir characterization** - Paper: [https://arxiv.org/abs/2004.07871](https://arxiv.org/abs/2004.07871) -## Authors +## πŸ‘₯ Authors - **Rafael Orozco** - Georgia Institute of Technology [rorozco@gatech.edu] - **Philipp Witte** - Georgia Institute of Technology (now Microsoft) @@ -236,14 +178,14 @@ The following publications use InvertibleNetworks.jl: - **Mathias Louboutin** - Georgia Institute of Technology - **Ali Siahkoohi** - Georgia Institute of Technology -## Acknowledgments +## πŸ™ Acknowledgments This package uses functions from: - [NNlib.jl](https://github.com/FluxML/NNlib.jl) - [Flux.jl](https://github.com/FluxML/Flux.jl) - [Wavelets.jl](https://github.com/JuliaDSP/Wavelets.jl) -## License +## πŸ“„ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. diff --git a/test/test_networks/test_multiscale_hint_network.jl b/test/test_networks/test_multiscale_hint_network.jl index cb01879a..7a406b0b 100644 --- a/test/test_networks/test_multiscale_hint_network.jl +++ b/test/test_networks/test_multiscale_hint_network.jl @@ -3,7 +3,7 @@ # Date: October 2020 using InvertibleNetworks, LinearAlgebra, Test, Random -Random.seed!(11) +Random.seed!(12) # Define network nx = 64 From ceb06233dee3d89438cf69915ee7afc3b5eeb520 Mon Sep 17 00:00:00 2001 From: Jayjay Park Date: Tue, 5 Aug 2025 07:43:59 -0400 Subject: [PATCH 3/6] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b7f58f83..b88dbb1f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ |:-----------------:|:-----------------:|:----------------:| |[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://slimgroup.github.io/InvertibleNetworks.jl/stable/) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://slimgroup.github.io/InvertibleNetworks.jl/dev/)| [![CI](https://github.com/slimgroup/InvertibleNetworks.jl/actions/workflows/runtests.yml/badge.svg)](https://github.com/slimgroup/InvertibleNetworks.jl/actions/workflows/runtests.yml)| [![DOI](https://joss.theoj.org/papers/10.21105/joss.06554/status.svg)](https://doi.org/10.21105/joss.06554) -Building blocks for invertible neural networks in the [Julia] programming language. ## 🎯 Overview @@ -76,8 +75,10 @@ Y, logdet = AN.forward(X) ### Utilities - **Jacobian Computation**: Hand-derived Jacobians for memory efficiency +- **Dimensionality Manipulation**: squeeze/unsqueeze (column, patch, checkerboard), split/cat - **Wavelet Transform** + ## 🌐 Network Architectures ### Pre-built Networks @@ -104,6 +105,14 @@ Due to its memory scaling InvertibleNetworks.jl, has been particularily successf ![mnist_sampling_cond](docs/src/figures/mnist_sampling_cond.png) +### Other Examples + +- **Invertible recurrent inference machines** (Putzky and Welling, 2019) ([generic example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/networks/network_irim.jl)) + +- **Generative models with maximum likelihood** via the change of variable formula ([example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/applications/application_glow_banana_dist.jl)) + +- **Glow**: Generative flow with invertible 1x1 convolutions (Kingma and Dhariwal, 2018) ([generic example](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/examples/networks/network_glow.jl), [source](https://github.com/slimgroup/InvertibleNetworks.jl/tree/master/src/networks/invertible_network_glow.jl)) + ## πŸ“– Documentation - **API Documentation**: [Stable](https://slimgroup.github.io/InvertibleNetworks.jl/stable/) | [Development](https://slimgroup.github.io/InvertibleNetworks.jl/dev/) From 3659c36bdfde6f4a06ff5fc29a4744e571e4de18 Mon Sep 17 00:00:00 2001 From: Jayjay Park Date: Tue, 5 Aug 2025 13:18:31 -0400 Subject: [PATCH 4/6] Deleted .CondaPkg --- .CondaPkg/.gitattributes | 2 - .CondaPkg/.gitignore | 4 - .CondaPkg/meta | Bin 669 -> 0 bytes .CondaPkg/pixi.lock | 492 --------------------------------------- .CondaPkg/pixi.toml | 15 -- 5 files changed, 513 deletions(-) delete mode 100644 .CondaPkg/.gitattributes delete mode 100644 .CondaPkg/.gitignore delete mode 100644 .CondaPkg/meta delete mode 100644 .CondaPkg/pixi.lock delete mode 100644 .CondaPkg/pixi.toml diff --git a/.CondaPkg/.gitattributes b/.CondaPkg/.gitattributes deleted file mode 100644 index 887a2c18..00000000 --- a/.CondaPkg/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# SCM syntax highlighting & preventing 3-way merges -pixi.lock merge=binary linguist-language=YAML linguist-generated=true diff --git a/.CondaPkg/.gitignore b/.CondaPkg/.gitignore deleted file mode 100644 index 740bb7d1..00000000 --- a/.CondaPkg/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ - -# pixi environments -.pixi -*.egg-info diff --git a/.CondaPkg/meta b/.CondaPkg/meta deleted file mode 100644 index 7c20137247848b0434e8c85e4b426bf35e56818a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 669 zcmbu6?MlNi6o&mm{K9+i@7!|MZGOQN#zdWn7Q}%+vo!0{rb$WCuKnR{cs*W+7vgWb zE*(Q02!=p%Ue5cRm*jA5zCPaHdS6GMy`ilk5(WsoXsR@LX%y#hElCnlVKm$_bC--@ zAX2If8*%zb%~YyTqkseIOW|QR^Z~^zV?ae(5a<{u+-zF<&A+F(N(Ph|WMst8D%wOw z6at(VJH{#m6eOJCSpue{m}gHNV!Z diff --git a/.CondaPkg/pixi.lock b/.CondaPkg/pixi.lock deleted file mode 100644 index 2e89d8ed..00000000 --- a/.CondaPkg/pixi.lock +++ /dev/null @@ -1,492 +0,0 @@ -version: 6 -environments: - default: - channels: - - url: https://conda.anaconda.org/conda-forge/ - packages: - linux-64: - - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 - - conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.7.14-hbd8a1cb_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/icu-75.1-he02047a_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.44-h1423503_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-32_h59b9bed_openblas.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-32_he106b2a_openblas.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.7.1-hecca717_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.6-h2dba641_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.3.0-h767d61c_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-14.3.0-h69a702a_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-14.3.0-h69a702a_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-14.3.0-h8004f2c_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.3.0-h767d61c_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-32_h7ac8fdf_openblas.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.1-hb9d3cd8_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hb9d3cd8_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.30-pthreads_h94d23a6_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.50.3-hee844dc_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-14.3.0-h8f9b012_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-14.3.0-h4852527_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/numpy-2.3.2-py312h33ff503_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.5.1-h7b32b05_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.11-h9e4cc4f_0_cpython.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.12-8_cp312.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/pywavelets-1.8.0-py312hc0a28a1_0.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8c095d6_2.conda - - conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_hd72426e_102.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda -packages: -- conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 - sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726 - md5: d7c89558ba9fa0495403155b64376d81 - arch: x86_64 - platform: linux - license: None - size: 2562 - timestamp: 1578324546067 -- conda: https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2 - build_number: 16 - sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22 - md5: 73aaf86a425cc6e73fcf236a5a46396d - depends: - - _libgcc_mutex 0.1 conda_forge - - libgomp >=7.5.0 - constrains: - - openmp_impl 9999 - arch: x86_64 - platform: linux - license: BSD-3-Clause - license_family: BSD - size: 23621 - timestamp: 1650670423406 -- conda: https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda - sha256: 5ced96500d945fb286c9c838e54fa759aa04a7129c59800f0846b4335cee770d - md5: 62ee74e96c5ebb0af99386de58cf9553 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc-ng >=12 - arch: x86_64 - platform: linux - license: bzip2-1.0.6 - license_family: BSD - size: 252783 - timestamp: 1720974456583 -- conda: https://conda.anaconda.org/conda-forge/noarch/ca-certificates-2025.7.14-hbd8a1cb_0.conda - sha256: 29defbd83c7829788358678ec996adeee252fa4d4274b7cd386c1ed73d2b201e - md5: d16c90324aef024877d8713c0b7fea5b - depends: - - __unix - license: ISC - size: 155658 - timestamp: 1752482350666 -- conda: https://conda.anaconda.org/conda-forge/linux-64/icu-75.1-he02047a_0.conda - sha256: 71e750d509f5fa3421087ba88ef9a7b9be11c53174af3aa4d06aff4c18b38e8e - md5: 8b189310083baabfb622af68fd9d3ae3 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc-ng >=12 - - libstdcxx-ng >=12 - arch: x86_64 - platform: linux - license: MIT - license_family: MIT - size: 12129203 - timestamp: 1720853576813 -- conda: https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.44-h1423503_1.conda - sha256: 1a620f27d79217c1295049ba214c2f80372062fd251b569e9873d4a953d27554 - md5: 0be7c6e070c19105f966d3758448d018 - depends: - - __glibc >=2.17,<3.0.a0 - constrains: - - binutils_impl_linux-64 2.44 - arch: x86_64 - platform: linux - license: GPL-3.0-only - license_family: GPL - size: 676044 - timestamp: 1752032747103 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-32_h59b9bed_openblas.conda - build_number: 32 - sha256: 1540bf739feb446ff71163923e7f044e867d163c50b605c8b421c55ff39aa338 - md5: 2af9f3d5c2e39f417ce040f5a35c40c6 - depends: - - libopenblas >=0.3.30,<0.3.31.0a0 - - libopenblas >=0.3.30,<1.0a0 - constrains: - - libcblas 3.9.0 32*_openblas - - mkl <2025 - - liblapacke 3.9.0 32*_openblas - - blas 2.132 openblas - - liblapack 3.9.0 32*_openblas - arch: x86_64 - platform: linux - license: BSD-3-Clause - license_family: BSD - size: 17330 - timestamp: 1750388798074 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-32_he106b2a_openblas.conda - build_number: 32 - sha256: 92a001fc181e6abe4f4a672b81d9413ca2f22609f8a95327dfcc6eee593ffeb9 - md5: 3d3f9355e52f269cd8bc2c440d8a5263 - depends: - - libblas 3.9.0 32_h59b9bed_openblas - constrains: - - blas 2.132 openblas - - liblapack 3.9.0 32*_openblas - - liblapacke 3.9.0 32*_openblas - arch: x86_64 - platform: linux - license: BSD-3-Clause - license_family: BSD - size: 17308 - timestamp: 1750388809353 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.7.1-hecca717_0.conda - sha256: da2080da8f0288b95dd86765c801c6e166c4619b910b11f9a8446fb852438dc2 - md5: 4211416ecba1866fab0c6470986c22d6 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=14 - constrains: - - expat 2.7.1.* - arch: x86_64 - platform: linux - license: MIT - license_family: MIT - size: 74811 - timestamp: 1752719572741 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.6-h2dba641_1.conda - sha256: 764432d32db45466e87f10621db5b74363a9f847d2b8b1f9743746cd160f06ab - md5: ede4673863426c0883c0063d853bbd85 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=13 - arch: x86_64 - platform: linux - license: MIT - license_family: MIT - size: 57433 - timestamp: 1743434498161 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.3.0-h767d61c_3.conda - sha256: cb05e85e62abba5d82e0902ff6d7cc578b1a811d4754ccb6bf438436eb1414e7 - md5: a540c7dba846693605f062b4375a7a38 - depends: - - __glibc >=2.17,<3.0.a0 - - _openmp_mutex >=4.5 - constrains: - - libgomp 14.3.0 h767d61c_3 - - libgcc-ng ==14.3.0=*_3 - arch: x86_64 - platform: linux - license: GPL-3.0-only WITH GCC-exception-3.1 - license_family: GPL - size: 821958 - timestamp: 1750808381771 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-14.3.0-h69a702a_3.conda - sha256: 83fb57adf08c3f523f2836bfd090206ab88a579fcf7aa3aa1fe59f3e83b90ea7 - md5: 2df292e90325f4252e3d29f14ae98e78 - depends: - - libgcc 14.3.0 h767d61c_3 - arch: x86_64 - platform: linux - license: GPL-3.0-only WITH GCC-exception-3.1 - license_family: GPL - size: 29039 - timestamp: 1750808387511 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran-14.3.0-h69a702a_3.conda - sha256: decc34db57152d8551a3847a765ec5c3e6b4f986581a18fcd76bcc6bb78201a1 - md5: 53f7347ca2044b176e5b1647210d12ab - depends: - - libgfortran5 14.3.0 h8004f2c_3 - constrains: - - libgfortran-ng ==14.3.0=*_3 - arch: x86_64 - platform: linux - license: GPL-3.0-only WITH GCC-exception-3.1 - license_family: GPL - size: 29027 - timestamp: 1750808413311 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-14.3.0-h8004f2c_3.conda - sha256: 088f0dc1a00b50447e91c9b2861a361f8cb58e0753049464d184d2c8c398865e - md5: 1c89abf6a5500986074e05e671d49087 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=14.3.0 - constrains: - - libgfortran 14.3.0 - arch: x86_64 - platform: linux - license: GPL-3.0-only WITH GCC-exception-3.1 - license_family: GPL - size: 1435436 - timestamp: 1750808397013 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.3.0-h767d61c_3.conda - sha256: e2cfcb61f1fed52275db0f72eae2c196736e674e04fa472b164081a71913c6e8 - md5: f831e43fc0f7358518ecf63acc01464b - depends: - - __glibc >=2.17,<3.0.a0 - arch: x86_64 - platform: linux - license: GPL-3.0-only WITH GCC-exception-3.1 - license_family: GPL - size: 435166 - timestamp: 1750808314714 -- conda: https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-32_h7ac8fdf_openblas.conda - build_number: 32 - sha256: 5b55a30ed1b3f8195dad9020fe1c6d0f514829bfaaf0cf5e393e93682af009f2 - md5: 6c3f04ccb6c578138e9f9899da0bd714 - depends: - - libblas 3.9.0 32_h59b9bed_openblas - constrains: - - libcblas 3.9.0 32*_openblas - - blas 2.132 openblas - - liblapacke 3.9.0 32*_openblas - arch: x86_64 - platform: linux - license: BSD-3-Clause - license_family: BSD - size: 17316 - timestamp: 1750388820745 -- conda: https://conda.anaconda.org/conda-forge/linux-64/liblzma-5.8.1-hb9d3cd8_2.conda - sha256: f2591c0069447bbe28d4d696b7fcb0c5bd0b4ac582769b89addbcf26fb3430d8 - md5: 1a580f7796c7bf6393fddb8bbbde58dc - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=13 - constrains: - - xz 5.8.1.* - arch: x86_64 - platform: linux - license: 0BSD - size: 112894 - timestamp: 1749230047870 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hb9d3cd8_1.conda - sha256: 927fe72b054277cde6cb82597d0fcf6baf127dcbce2e0a9d8925a68f1265eef5 - md5: d864d34357c3b65a4b731f78c0801dc4 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=13 - arch: x86_64 - platform: linux - license: LGPL-2.1-only - license_family: GPL - size: 33731 - timestamp: 1750274110928 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.30-pthreads_h94d23a6_1.conda - sha256: 3f3fc30fe340bc7f8f46fea6a896da52663b4d95caed1f144e8ea114b4bb6b61 - md5: 7e2ba4ca7e6ffebb7f7fc2da2744df61 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=14 - - libgfortran - - libgfortran5 >=14.3.0 - constrains: - - openblas >=0.3.30,<0.3.31.0a0 - arch: x86_64 - platform: linux - license: BSD-3-Clause - size: 5918161 - timestamp: 1753405234435 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.50.3-hee844dc_1.conda - sha256: 8c4faf560815a6d6b5edadc019f76d22a45171eaa707a1f1d1898ceda74b2e3f - md5: 18d2ac95b507ada9ca159a6bd73255f7 - depends: - - __glibc >=2.17,<3.0.a0 - - icu >=75.1,<76.0a0 - - libgcc >=14 - - libzlib >=1.3.1,<2.0a0 - arch: x86_64 - platform: linux - license: blessing - size: 936339 - timestamp: 1753262589168 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-14.3.0-h8f9b012_3.conda - sha256: 15a4859155bfa1c901a531a388e8638e2edce3b4082504e5efbb7d04f4eb0210 - md5: 0ef4cb7fef6f564b03b2825c59221c28 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc 14.3.0 h767d61c_3 - arch: x86_64 - platform: linux - license: GPL-3.0-only WITH GCC-exception-3.1 - license_family: GPL - size: 3863872 - timestamp: 1750808408743 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-14.3.0-h4852527_3.conda - sha256: e6bc95afa2d6fed3e484b887f6a26bce7aad0cb66a0a0da98dc765c2390e3c18 - md5: bf57e2923c63c0a341246151dab52e72 - depends: - - libstdcxx 14.3.0 h8f9b012_3 - arch: x86_64 - platform: linux - license: GPL-3.0-only WITH GCC-exception-3.1 - license_family: GPL - size: 29060 - timestamp: 1750808441952 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda - sha256: 787eb542f055a2b3de553614b25f09eefb0a0931b0c87dbcce6efdfd92f04f18 - md5: 40b61aab5c7ba9ff276c41cfffe6b80b - depends: - - libgcc-ng >=12 - arch: x86_64 - platform: linux - license: BSD-3-Clause - license_family: BSD - size: 33601 - timestamp: 1680112270483 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda - sha256: 6ae68e0b86423ef188196fff6207ed0c8195dd84273cb5623b85aa08033a410c - md5: 5aa797f8787fe7a17d1b0821485b5adc - depends: - - libgcc-ng >=12 - arch: x86_64 - platform: linux - license: LGPL-2.1-or-later - size: 100393 - timestamp: 1702724383534 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda - sha256: d4bfe88d7cb447768e31650f06257995601f89076080e76df55e3112d4e47dc4 - md5: edb0dca6bc32e4f4789199455a1dbeb8 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=13 - constrains: - - zlib 1.3.1 *_2 - arch: x86_64 - platform: linux - license: Zlib - license_family: Other - size: 60963 - timestamp: 1727963148474 -- conda: https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda - sha256: 3fde293232fa3fca98635e1167de6b7c7fda83caf24b9d6c91ec9eefb4f4d586 - md5: 47e340acb35de30501a76c7c799c41d7 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=13 - arch: x86_64 - platform: linux - license: X11 AND BSD-3-Clause - size: 891641 - timestamp: 1738195959188 -- conda: https://conda.anaconda.org/conda-forge/linux-64/numpy-2.3.2-py312h33ff503_0.conda - sha256: d54e52df67e0be7e5faa9e6f0efccea3d72f635a3159cc151c4668e5159f6ef3 - md5: 3f6efbc40eb13f019c856c410fa921d2 - depends: - - python - - libgcc >=14 - - __glibc >=2.17,<3.0.a0 - - libstdcxx >=14 - - libgcc >=14 - - libblas >=3.9.0,<4.0a0 - - python_abi 3.12.* *_cp312 - - libcblas >=3.9.0,<4.0a0 - - liblapack >=3.9.0,<4.0a0 - constrains: - - numpy-base <0a0 - arch: x86_64 - platform: linux - license: BSD-3-Clause - size: 8785045 - timestamp: 1753401550884 -- conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.5.1-h7b32b05_0.conda - sha256: 942347492164190559e995930adcdf84e2fea05307ec8012c02a505f5be87462 - md5: c87df2ab1448ba69169652ab9547082d - depends: - - __glibc >=2.17,<3.0.a0 - - ca-certificates - - libgcc >=13 - arch: x86_64 - platform: linux - license: Apache-2.0 - license_family: Apache - size: 3131002 - timestamp: 1751390382076 -- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.11-h9e4cc4f_0_cpython.conda - sha256: 6cca004806ceceea9585d4d655059e951152fc774a471593d4f5138e6a54c81d - md5: 94206474a5608243a10c92cefbe0908f - depends: - - __glibc >=2.17,<3.0.a0 - - bzip2 >=1.0.8,<2.0a0 - - ld_impl_linux-64 >=2.36.1 - - libexpat >=2.7.0,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 - - libgcc >=13 - - liblzma >=5.8.1,<6.0a0 - - libnsl >=2.0.1,<2.1.0a0 - - libsqlite >=3.50.0,<4.0a0 - - libuuid >=2.38.1,<3.0a0 - - libxcrypt >=4.4.36 - - libzlib >=1.3.1,<2.0a0 - - ncurses >=6.5,<7.0a0 - - openssl >=3.5.0,<4.0a0 - - readline >=8.2,<9.0a0 - - tk >=8.6.13,<8.7.0a0 - - tzdata - constrains: - - python_abi 3.12.* *_cp312 - arch: x86_64 - platform: linux - license: Python-2.0 - size: 31445023 - timestamp: 1749050216615 -- conda: https://conda.anaconda.org/conda-forge/noarch/python_abi-3.12-8_cp312.conda - build_number: 8 - sha256: 80677180dd3c22deb7426ca89d6203f1c7f1f256f2d5a94dc210f6e758229809 - md5: c3efd25ac4d74b1584d2f7a57195ddf1 - constrains: - - python 3.12.* *_cpython - license: BSD-3-Clause - license_family: BSD - size: 6958 - timestamp: 1752805918820 -- conda: https://conda.anaconda.org/conda-forge/linux-64/pywavelets-1.8.0-py312hc0a28a1_0.conda - sha256: ec5c23785a7975130a988fafca41154a900b994cf0e8b1a2ae24ede25c4ff538 - md5: 3f62987017ad18e9e7dadce9899de9ef - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=13 - - numpy >=1.19,<3 - - numpy >=1.23,<3 - - python >=3.12,<3.13.0a0 - - python_abi 3.12.* *_cp312 - arch: x86_64 - platform: linux - license: MIT - license_family: MIT - size: 3738123 - timestamp: 1733419534825 -- conda: https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8c095d6_2.conda - sha256: 2d6d0c026902561ed77cd646b5021aef2d4db22e57a5b0178dfc669231e06d2c - md5: 283b96675859b20a825f8fa30f311446 - depends: - - libgcc >=13 - - ncurses >=6.5,<7.0a0 - arch: x86_64 - platform: linux - license: GPL-3.0-only - license_family: GPL - size: 282480 - timestamp: 1740379431762 -- conda: https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_hd72426e_102.conda - sha256: a84ff687119e6d8752346d1d408d5cf360dee0badd487a472aa8ddedfdc219e1 - md5: a0116df4f4ed05c303811a837d5b39d8 - depends: - - __glibc >=2.17,<3.0.a0 - - libgcc >=13 - - libzlib >=1.3.1,<2.0a0 - arch: x86_64 - platform: linux - license: TCL - license_family: BSD - size: 3285204 - timestamp: 1748387766691 -- conda: https://conda.anaconda.org/conda-forge/noarch/tzdata-2025b-h78e105d_0.conda - sha256: 5aaa366385d716557e365f0a4e9c3fca43ba196872abbbe3d56bb610d131e192 - md5: 4222072737ccff51314b5ece9c7d6f5a - license: LicenseRef-Public-Domain - size: 122968 - timestamp: 1742727099393 diff --git a/.CondaPkg/pixi.toml b/.CondaPkg/pixi.toml deleted file mode 100644 index 820dc7b0..00000000 --- a/.CondaPkg/pixi.toml +++ /dev/null @@ -1,15 +0,0 @@ -[dependencies] -libstdcxx-ng = ">=3.4,<15.0" -pywavelets = "*" - - [dependencies.python] - channel = "conda-forge" - build = "*cpython*" - version = ">=3.8,<4" - -[project] -name = ".CondaPkg" -platforms = ["linux-64"] -channels = ["conda-forge"] -channel-priority = "strict" -description = "automatically generated by CondaPkg.jl" From 01cd6e3d357a21c0257c9d75540853c6c5f65089 Mon Sep 17 00:00:00 2001 From: Jayjay Park Date: Wed, 6 Aug 2025 16:12:18 -0400 Subject: [PATCH 5/6] Updated README.md accordingly - changed Full GPU to Nvidia GPU - changed location of installation to the front --- README.md | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b88dbb1f..278d2803 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,33 @@ InvertibleNetworks.jl provides memory-efficient building blocks for invertible n - **Memory Efficient**: Hand-derived gradients, Jacobians J, and log|J| for optimal memory usage - **Flux Integration**: Seamless integration with Flux.jl for automatic differentiation - **AD Support**: Support for [Zygote] and [ChainRules] automatic differentiation -- **GPU Support**: Full GPU support via CuArray +- **GPU Support**: Nvidia GPU support via CuArray - **Comprehensive Examples**: Various examples of invertible neural networks, normalizing flows, variational inference, and uncertainty quantification ## πŸš€ Quick Start +### Installation + +In Julia REPL, + +```julia +] add InvertibleNetworks +``` + +Or + +```julia +using Pkg +Pkg.develop("InvertibleNetworks") +``` + +### Running Tests + +```julia +using Pkg +Pkg.test("InvertibleNetworks") +``` + ### Basic Usage ```julia @@ -123,19 +145,6 @@ Due to its memory scaling InvertibleNetworks.jl, has been particularily successf We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. -### Development Setup - -```julia -using Pkg -Pkg.develop("InvertibleNetworks") -``` - -### Running Tests - -```julia -using Pkg -Pkg.test("InvertibleNetworks") -``` ## πŸ“„ Citation From fc1fd515a85e5291f53104c5646a2f33248576b9 Mon Sep 17 00:00:00 2001 From: Jayjay Park Date: Sat, 27 Sep 2025 23:40:42 -0400 Subject: [PATCH 6/6] Update for CI --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 2d29ee16..9f1394c8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -77,4 +77,4 @@ if test_suite == "all" || test_suite == "networks" end end -show(TIMEROUTPUT; compact=true, sortby=:firstexec) \ No newline at end of file +show(TIMEROUTPUT; compact=true, sortby=:firstexec)