tff.simulation.models.mnist.create_keras_model

Stay organized with collections Save and categorize content based on your preferences.

Returns an instance of tf.keras.Model for use with the MNIST example.

This code is based on the following target, which unfortunately cannot be imported as it is a Python binary, not a library:

https://github.com/tensorflow/models/blob/master/official/r1/mnist/mnist.py

compile_model If True, compile the model with a basic optimizer and loss.

A tf.keras.Model.