From fc7d44ddb13d9b181ecc2e53088fe3845027e3b2 Mon Sep 17 00:00:00 2001 From: Tomas Plsek Date: Wed, 21 Aug 2024 21:07:28 +0200 Subject: [PATCH] update to Keras 2.15 --- README.md | 4 ++-- pycadet/pycadet.py | 2 +- setup.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bdeee5c..adcf2a2 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ $ pip3 install git+https://github.com/tomasplsek/CADET.git The `pycadet` package requires the following libraries (which should be installed automatically with the package): ``` +keras<=2.12 +tensorflow numpy scipy astropy matplotlib -pyds9 scikit-learn>=1.1 -tensorflow>=2.8 ``` For Conda environments, it is recommended to install the dependencies beforehand as some of the packages can be tricky to install in an existing environment (especially `tensorflow`) and on some machines (especially new Macs). For machines with dedicated NVIDIA GPUs, `tensorflow-gpu` can be installed to allow the CADET model to leverage the GPU for faster inference. diff --git a/pycadet/pycadet.py b/pycadet/pycadet.py index 8103a02..c2617c1 100644 --- a/pycadet/pycadet.py +++ b/pycadet/pycadet.py @@ -505,7 +505,7 @@ def CADET(galaxy, scales=[1,2,3,4], ra="", dec="", th1=0.4, th2=0.7, shift=False ax.quiver(center[0], center[1], np.cos(angle)*a, np.sin(angle)*a, color='cyan', scale=1, scale_units='xy', angles='xy', zorder=1) ax.quiver(center[0], center[1], -np.sin(angle)*b, np.cos(angle)*b, - color='cyan', scale=1, scale_units='xy', angles='xy', zorder=1) + color='white', scale=1, scale_units='xy', angles='xy', zorder=1) ccd = CCDData(cav, unit="adu", wcs=wcs) ccd.write(f"{galaxy}/decomposed/{galaxy}_{size}_{i+1}.fits", overwrite=True) diff --git a/setup.py b/setup.py index cf3c20f..378b966 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,9 @@ from pathlib import Path from setuptools import setup, find_packages -requirements = ["keras == 2.12", - "tensorflow-cpu == 2.12", - "scikit-learn >= 1.2", +requirements = ["keras <= 2.15", + "tensorflow", + "scikit-learn", "numpy >=1.8", "pandas", "matplotlib", # >= 3.1.1", @@ -18,7 +18,7 @@ MAJOR = "0" MINOR = "2" -MICRO = "0" +MICRO = "7" version = "%s.%s.%s" % (MAJOR, MINOR, MICRO) setup(