Module: tff.learning.models
Stay organized with collections
Save and categorize content based on your preferences.
Libraries for working with models in federated learning algorithms.
Classes
class BatchOutput
: A structure that holds the output of a tff.learning.models.VariableModel
.
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
.
class ReconstructionModel
: Represents a reconstruction model for use in Tensorflow Federated.
class VariableModel
: Represents a variable-based model for use in TensorFlow Federated.
Functions
from_keras_model(...)
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.models.VariableModel
.
load_functional_model(...)
: Deserializes a TensorFlow SavedModel at path
to a functional model.
model_from_functional(...)
: Converts a FunctionalModel
to a tff.learning.models.VariableModel
.
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.models.VariableModel
or callable that constructs a model.
Type Aliases
ReconstructionDatasetSplitFn
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-20 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-09-20 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-20 UTC."],[],[]]