Skip to content

Commit c35edef

Browse files
committed
Add python 3.12 to tfkeras CI and remove warning message
1 parent dcce6bc commit c35edef

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/workflows/tfkeras.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
17+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
1818

1919
steps:
2020
- uses: actions/checkout@v4

tfkeras/tfkeras_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import urllib
1616

1717
import optuna
18-
from optuna.integration import TFKerasPruningCallback
1918
from optuna.trial import TrialState
19+
from optuna.integration import TFKerasPruningCallback
2020
import tensorflow_datasets as tfds
2121

2222
import tensorflow as tf

tfkeras/tfkeras_simple.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from tensorflow.keras.datasets import mnist
1616
from tensorflow.keras.layers import Conv2D
1717
from tensorflow.keras.layers import Dense
18+
from tensorflow.keras.layers import Input
1819
from tensorflow.keras.layers import Flatten
1920
from tensorflow.keras.models import Sequential
2021
from tensorflow.keras.optimizers import RMSprop
@@ -47,13 +48,13 @@ def objective(trial):
4748
input_shape = (img_x, img_y, 1)
4849

4950
model = Sequential()
51+
model.add(Input(input_shape))
5052
model.add(
5153
Conv2D(
5254
filters=trial.suggest_categorical("filters", [32, 64]),
5355
kernel_size=trial.suggest_categorical("kernel_size", [3, 5]),
5456
strides=trial.suggest_categorical("strides", [1, 2]),
5557
activation=trial.suggest_categorical("activation", ["relu", "linear"]),
56-
input_shape=input_shape,
5758
)
5859
)
5960
model.add(Flatten())

0 commit comments

Comments
 (0)