nupic.tensorflow.constraints¶
-
class
SparseWeights
(percent_on=0.5, name=None)[source]¶ Bases:
tensorflow.keras.constraints.Constraint
Sparse weights constraint.
Constrains the weights to a fixed sparsity rate where a fixed number of weights are always zeros.
- Parameters
percent_on – Percentage of weights that are allowed to be non-zero. Default 0.5