Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tff.learning.framework.ModelWeights

View source

Class ModelWeights

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

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.

Properties

trainable

non_trainable

Methods

assign_weights_to

View source

assign_weights_to(keras_model)

Assign these TFF model weights to the weights of a tf.keras.Model.

Args:

from_model

View source

@classmethod
from_model(
    cls,
    model
)

from_tff_value

View source

@classmethod
from_tff_value(
    cls,
    anon_tuple
)