diff --git a/machine_learning/neural_networks/cnn_mnist.py b/machine_learning/neural_networks/cnn_mnist.py index 5a4bbe70dfeb..e4ef937b60bd 100644 --- a/machine_learning/neural_networks/cnn_mnist.py +++ b/machine_learning/neural_networks/cnn_mnist.py @@ -57,8 +57,7 @@ model.add(layers.Dense(10, activation="softmax")) # Compile the model -model.compile(optimizer="adam", loss="categorical_crossentropy", - metrics=["accuracy"]) +model.compile(optimizer="adam", loss="categorical_crossentropy", metrics=["accuracy"]) # Display the model summary model.summary() diff --git a/machine_learning/neural_networks/fully_connected_mnist.py b/machine_learning/neural_networks/fully_connected_mnist.py index ac7d115af50e..24da20de8717 100644 --- a/machine_learning/neural_networks/fully_connected_mnist.py +++ b/machine_learning/neural_networks/fully_connected_mnist.py @@ -56,8 +56,7 @@ # Compile the model model.compile( - optimizer="adam", loss="sparse_categorical_crossentropy", - metrics=["accuracy"] + optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"] ) # Train the model on the MNIST training data