📜  什么优化器到simplenn - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:41.828000             🧑  作者: Mango

代码示例2
model = build_model(allow_cudnn_kernel=True)

model.compile(
    loss=keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    optimizer="sgd",
    metrics=["accuracy"],
)


model.fit(
    x_train, y_train, validation_data=(x_test, y_test), batch_size=batch_size, epochs=1
)