Missed TensorFlow World? Check out the recap. Learn more

tff.learning.framework.ModelWeights

View source on GitHub

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.

__new__

View source

@staticmethod
__new__(
    cls,
    trainable,
    non_trainable
)

Create new instance of ModelWeightsBase(trainable, non_trainable)

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
)