Layer/Model weights as R arrays
Arguments
- object
Layer or model object
- trainable
if
NA
(the default), all weights are returned. IfTRUE
, only weights of trainable variables are returned. IfFALSE
, only weights of non-trainable variables are returned.- weights
Weights as R array
Note
You can access the Layer/Model as KerasVariables
(which are also
backend-native tensors like tf.Variable
) at object$weights
,
object$trainable_weights
, or object$non_trainable_weights
See also
Other layer methods: count_params()
get_config()
quantize_weights()
reset_state()