View source on GitHub |
Specifies to prune only 1x1 Conv2D layers in the model.
Inherits From: PruningPolicy
Used in the notebooks
Used in the guide |
---|
PruneForLatencyOnXNNPack checks that the model contains a subgraph that can
leverage XNNPACK's sparse inference and applies pruning wrapper only to
Conv2D with kernel_size = (1, 1)
.
Reference | |
---|---|
Methods
allow_pruning
allow_pruning(
layer
)
Allows to prune only 1x1 Conv2D layers.
ensure_model_supports_pruning
ensure_model_supports_pruning(
model
)
Ensures that the model contains only supported layers.