# tf.contrib.model_pruning.get_weight_sparsity

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/model_pruning/python/pruning.py#L133-L143) |

Get sparsity of the weights.

    tf.contrib.model_pruning.get_weight_sparsity()

<br />

<br />

<br />

| ## Args ||
|---|---|
| None ||

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A list containing the sparsity of each of the weight tensors ||

<br />