Attend the Women in ML Symposium on December 7 Register now

tff.learning.ModelWeights

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

Used in the notebooks

Used in the tutorials

Note this does not include the model's local variables.

It may also be used to hold other values that are parallel to these variables, e.g., tensors corresponding to variable values, or updates to model variables.

non_trainable

trainable

Methods

assign_weights_to

View source

Assign these TFF model weights to the weights of a model.

Args
model A tf.keras.Model or tff.learning.Model instance to assign the weights to.

convert_variables_to_arrays

View source

Converts any internal tf.Variables to numpy arrays.

from_model

View source

from_tff_result

View source