tfm.core.train_utils.try_count_params
Count the number of parameters if model is possible.
tfm.core.train_utils.try_count_params(
model: Union[tf.Module, tf.keras.Model], trainable_only: bool = False
)
Args |
model
|
Try to count the number of params in this model.
|
trainable_only
|
Whether to calculate trainable params only. This flag is
not used when the model has count_params attribute.
|
Returns |
The number of parameters or None.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-02-02 UTC.
[null,null,["Last updated 2024-02-02 UTC."],[],[]]