How to count total number of trainable parameters in a tensorflow model ?
How to count total number of trainable parameters in a tensorflow model ?
Here is an solution usingĀ numpy :
np.sum([np.prod(v.get_shape().as_list()) for v in tf.trainable_variables()])