Layer/Model weights as R arrays

get_weights(object, trainable = NA)

set_weights(object, weights)

Arguments

object

Layer or model object

trainable

if NA (the default), all weights are returned. If TRUE,

weights

Weights as R array

Note

You can access the Layer/Model as tf.Tensors or tf.Variables at object$weights, object$trainable_weights, or object$non_trainable_weights

See also