diff --git a/deeplc/deeplc.py b/deeplc/deeplc.py index 8bc441b..9699039 100644 --- a/deeplc/deeplc.py +++ b/deeplc/deeplc.py @@ -22,9 +22,9 @@ deeplc_dir = os.path.dirname(os.path.realpath(__file__)) DEFAULT_MODELS = [ - "mods/full_hc_PXD005573_mcp_1fd8363d9af9dcad3be7553c39396960.hdf5", - "mods/full_hc_PXD005573_mcp_8c22d89667368f2f02ad996469ba157e.hdf5", - "mods/full_hc_PXD005573_mcp_cb975cfdd4105f97efa0b3afffe075cc.hdf5", + "mods/full_hc_PXD005573_pub_1fd8363d9af9dcad3be7553c39396960.keras", + "mods/full_hc_PXD005573_pub_8c22d89667368f2f02ad996469ba157e.keras", + "mods/full_hc_PXD005573_pub_cb975cfdd4105f97efa0b3afffe075cc.keras", ] DEFAULT_MODELS = [os.path.join(deeplc_dir, dm) for dm in DEFAULT_MODELS] @@ -75,18 +75,18 @@ lrelu = lambda x: tf.keras.activations.relu(x, alpha=0.1, max_value=20.0) -try: - from tensorflow.compat.v1.keras.backend import set_session # noqa: F401 -except ImportError: - from tensorflow.keras.backend import set_session # noqa: F401 -try: - from tensorflow.compat.v1.keras.backend import clear_session -except ImportError: - from tensorflow.keras.backend import clear_session -try: - from tensorflow.compat.v1.keras.backend import get_session -except ImportError: - from tensorflow.keras.backend import get_session +# try: +# from tensorflow.compat.v1.keras.backend import set_session # noqa: F401 +# except ImportError: +# from tensorflow.keras.backend import set_session # noqa: F401 +# try: +# from tensorflow.compat.v1.keras.backend import clear_session +# except ImportError: +# from tensorflow.keras.backend import clear_session +# try: +# from tensorflow.compat.v1.keras.backend import get_session +# except ImportError: +# from tensorflow.keras.backend import get_session # Set to force CPU calculations os.environ["CUDA_VISIBLE_DEVICES"] = "-1" @@ -134,10 +134,10 @@ def divide_chunks(l, n): def reset_keras(): """Reset Keras session.""" - sess = get_session() - clear_session() - sess.close() - gc.collect() + # sess = get_session() + # clear_session() + # sess.close() + # gc.collect() # Set to force CPU calculations os.environ["CUDA_VISIBLE_DEVICES"] = "-1" @@ -641,7 +641,7 @@ def make_preds_core( self.calibrate_max, ) - clear_session() + # clear_session() gc.collect() return ret_preds diff --git a/deeplc/mods/full_hc_PXD005573_mcp_8c22d89667368f2f02ad996469ba157e.hdf5 b/deeplc/mods/full_hc_PXD005573_mcp_8c22d89667368f2f02ad996469ba157e.hdf5 deleted file mode 100644 index 10720be..0000000 Binary files a/deeplc/mods/full_hc_PXD005573_mcp_8c22d89667368f2f02ad996469ba157e.hdf5 and /dev/null differ diff --git a/deeplc/mods/full_hc_PXD005573_mcp_1fd8363d9af9dcad3be7553c39396960.hdf5 b/deeplc/mods/full_hc_PXD005573_pub_1fd8363d9af9dcad3be7553c39396960.keras similarity index 63% rename from deeplc/mods/full_hc_PXD005573_mcp_1fd8363d9af9dcad3be7553c39396960.hdf5 rename to deeplc/mods/full_hc_PXD005573_pub_1fd8363d9af9dcad3be7553c39396960.keras index 2b33612..1a1c6af 100644 Binary files a/deeplc/mods/full_hc_PXD005573_mcp_1fd8363d9af9dcad3be7553c39396960.hdf5 and b/deeplc/mods/full_hc_PXD005573_pub_1fd8363d9af9dcad3be7553c39396960.keras differ diff --git a/deeplc/mods/full_hc_PXD005573_pub_8c22d89667368f2f02ad996469ba157e.keras b/deeplc/mods/full_hc_PXD005573_pub_8c22d89667368f2f02ad996469ba157e.keras new file mode 100644 index 0000000..7016886 Binary files /dev/null and b/deeplc/mods/full_hc_PXD005573_pub_8c22d89667368f2f02ad996469ba157e.keras differ diff --git a/deeplc/mods/full_hc_PXD005573_mcp_cb975cfdd4105f97efa0b3afffe075cc.hdf5 b/deeplc/mods/full_hc_PXD005573_pub_cb975cfdd4105f97efa0b3afffe075cc.keras similarity index 55% rename from deeplc/mods/full_hc_PXD005573_mcp_cb975cfdd4105f97efa0b3afffe075cc.hdf5 rename to deeplc/mods/full_hc_PXD005573_pub_cb975cfdd4105f97efa0b3afffe075cc.keras index fb8811b..e2d23ba 100644 Binary files a/deeplc/mods/full_hc_PXD005573_mcp_cb975cfdd4105f97efa0b3afffe075cc.hdf5 and b/deeplc/mods/full_hc_PXD005573_pub_cb975cfdd4105f97efa0b3afffe075cc.keras differ diff --git a/pyproject.toml b/pyproject.toml index f38828b..7d4a918 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ keywords = [ ] dependencies = [ - "tensorflow>=2.2,<2.15.0", + "tensorflow>=2.15.0,<3", "numpy>=1.17,<2", "pandas>=0.25,<2", "h5py>=2.10.0,<4",