Attend the Women in ML Symposium on December 7 Register now

Module: tff.learning.models

Libraries for working with models in federated learning algorithms.

Classes

class FunctionalModel: A model that parameterizes forward pass by model weights.

class ModelWeights: A container for the trainable and non-trainable variables of a Model.

Functions

functional_model_from_keras(...): Converts a tf.keras.Model to a tff.learning.models.FunctionalModel.

load(...): Deserializes a TensorFlow SavedModel at path to a tff.learning.Model.

load_functional_model(...): Deserializes a TensorFlow SavedModel at path to a functional model.

model_from_functional(...): Converts a FunctionalModel to a tff.learning.Model.

save(...): Serializes model as a TensorFlow SavedModel to path.

save_functional_model(...): Serializes a FunctionalModel as a tf.SavedModel to path.

weights_type_from_model(...): Creates a tff.Type from a tff.learning.Model or callable that constructs a model.