Apprentissage profond
John Samuel
CPE Lyon
Year: 2023-2024
Email: john(dot)samuel(at)cpe(dot)fr
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.optimizers import SGD
# Créer un modèle séquentiel
model = Sequential()
model.add(Dense(4, activation='relu', input_shape=(3,)))
model.add(Dense(units=2, activation='softmax'))
# Compilation du modèle
sgd = SGD(lr=0.01)
model.compile(loss='mean_squared_error',
optimizer=sgd,metrics=['accuracy'])