From ccc43818a459cfe737e6eb9299b3803511bba8d5 Mon Sep 17 00:00:00 2001 From: franneck94 Date: Mon, 20 May 2024 20:32:42 +0200 Subject: [PATCH 1/2] fixed tests --- examples/example_grid_search.py | 2 +- examples/example_grid_search_cv.py | 2 +- examples/example_random_search.py | 2 +- examples/example_random_search_cv.py | 2 +- setup.py | 8 +++++++- tests/test_grid_search.py | 2 +- tests/test_grid_search_cv.py | 2 +- tests/test_random_search.py | 2 +- tests/test_random_search_cv.py | 2 +- 9 files changed, 15 insertions(+), 9 deletions(-) diff --git a/examples/example_grid_search.py b/examples/example_grid_search.py index 1f6aa36..5a17fa7 100644 --- a/examples/example_grid_search.py +++ b/examples/example_grid_search.py @@ -16,7 +16,7 @@ def build_model( learning_rate: float, ) -> Model: """Build the test model.""" - x_input = Input(shape=1) + x_input = Input(shape=(1,)) y_pred = Dense(units=1)(x_input) model = Model(inputs=[x_input], outputs=[y_pred]) diff --git a/examples/example_grid_search_cv.py b/examples/example_grid_search_cv.py index 8a5f83c..b758641 100644 --- a/examples/example_grid_search_cv.py +++ b/examples/example_grid_search_cv.py @@ -15,7 +15,7 @@ def build_model( learning_rate: float, ) -> Model: """Build the test model.""" - x_input = Input(shape=1) + x_input = Input(shape=(1,)) y_pred = Dense(units=1)(x_input) model = Model(inputs=[x_input], outputs=[y_pred]) diff --git a/examples/example_random_search.py b/examples/example_random_search.py index 8e928f0..23f577d 100644 --- a/examples/example_random_search.py +++ b/examples/example_random_search.py @@ -17,7 +17,7 @@ def build_model( learning_rate: float, ) -> Model: """Build the test model.""" - x_input = Input(shape=1) + x_input = Input(shape=(1,)) y_pred = Dense(units=1)(x_input) model = Model(inputs=[x_input], outputs=[y_pred]) diff --git a/examples/example_random_search_cv.py b/examples/example_random_search_cv.py index abf14ea..2f90e95 100644 --- a/examples/example_random_search_cv.py +++ b/examples/example_random_search_cv.py @@ -16,7 +16,7 @@ def build_model( learning_rate: float, ) -> Model: """Build the test model.""" - x_input = Input(shape=1) + x_input = Input(shape=(1,)) y_pred = Dense(units=1)(x_input) model = Model(inputs=[x_input], outputs=[y_pred]) diff --git a/setup.py b/setup.py index cb51bfd..96c70af 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,13 @@ ISRELEASED = False MIN_PYTHON_VERSION = "3.9" -INSTALL_REQUIRES = ["keras>=2.8", "numpy", "scipy", "scikit-learn>=1.0"] +INSTALL_REQUIRES = [ + "tensorflow>=2.13", + "keras>=3.0", + "numpy", + "scipy", + "scikit-learn>=1.0", +] PACKAGES = find_packages(include=["tensorcross", "tensorcross.*"]) diff --git a/tests/test_grid_search.py b/tests/test_grid_search.py index 904f6a0..0983ff5 100644 --- a/tests/test_grid_search.py +++ b/tests/test_grid_search.py @@ -49,7 +49,7 @@ def build_model( learning_rate: float, ) -> Model: """Build the test model.""" - x_input = Input(shape=num_features) + x_input = Input(shape=(num_features,)) y_pred = Dense(units=num_targets)(x_input) model = Model(inputs=[x_input], outputs=[y_pred]) diff --git a/tests/test_grid_search_cv.py b/tests/test_grid_search_cv.py index e45e431..09b46fb 100644 --- a/tests/test_grid_search_cv.py +++ b/tests/test_grid_search_cv.py @@ -42,7 +42,7 @@ def build_model( learning_rate: float, ) -> Model: """Build the test model.""" - x_input = Input(shape=num_features) + x_input = Input(shape=(num_features,)) y_pred = Dense(units=num_targets)(x_input) model = Model(inputs=[x_input], outputs=[y_pred]) diff --git a/tests/test_random_search.py b/tests/test_random_search.py index 8c4f76b..87f8646 100644 --- a/tests/test_random_search.py +++ b/tests/test_random_search.py @@ -52,7 +52,7 @@ def build_model( learning_rate: float, ) -> Model: """Build the test model.""" - x_input = Input(shape=num_features) + x_input = Input(shape=(num_features,)) y_pred = Dense(units=num_targets)(x_input) model = Model(inputs=[x_input], outputs=[y_pred]) diff --git a/tests/test_random_search_cv.py b/tests/test_random_search_cv.py index da6fd90..0963590 100644 --- a/tests/test_random_search_cv.py +++ b/tests/test_random_search_cv.py @@ -43,7 +43,7 @@ def build_model( learning_rate: float, ) -> Model: """Build the test model.""" - x_input = Input(shape=num_features) + x_input = Input(shape=(num_features,)) y_pred = Dense(units=num_targets)(x_input) model = Model(inputs=[x_input], outputs=[y_pred]) From 0e1830d98afafc3130cd15af55daf6003c85a9f3 Mon Sep 17 00:00:00 2001 From: franneck94 Date: Mon, 20 May 2024 20:34:39 +0200 Subject: [PATCH 2/2] bumped --- CHANGELOG.md | 4 ++++ tensorcross/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3fbaff..751b93f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # TensorCross Change Log +## Version 2.0.0: May 20, 2024 + +- This will be the stable version for TF 2.13+ which is the first version that supports keras 3.0 + ## Version 1.0.0: October 29, 2023 - Some rework, updates docs and versioning. This will be the stable version for TF (Keras) 2.8+ diff --git a/tensorcross/version.py b/tensorcross/version.py index 5becc17..8c0d5d5 100644 --- a/tensorcross/version.py +++ b/tensorcross/version.py @@ -1 +1 @@ -__version__ = "1.0.0" +__version__ = "2.0.0"