add_supported_layer¶
- paddle.fluid.contrib.sparsity.supported_layer_list. add_supported_layer ( layer, pruning_func=None ) [source]
-
Add supported layers and its corresponding pruning function.
- Parameters
-
name (string|Layer) – The name or type of layer, needed to support. If layer is Layer then
call (it would be turn to string internally. ASP would use this name to match parameter's name and) –
function. (its the corresponding pruning) –
pruning_func (function, optional) – a function type which receives five argument (weight_nparray,
m –
n –
func_name –
param_name) –
weight (param_name is the name of) –
weight –
:param : :param m: :param n: :param and func_name: :param please see prune_model for details.: