tfm.core.train_utils.try_count_params

Count the number of parameters if model is possible.

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.

The number of parameters or None.