Missed TensorFlow World? Check out the recap. Learn more

tff.simulation.models.mnist.create_keras_model

View source on GitHub

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

tff.simulation.models.mnist.create_keras_model(compile_model=False)

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/mnist/mnist.py

Args:

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

Returns:

A tf.keras.Model.