Skip to content

Pruning: Training with Near 100% Target Sparsity Fails #215

@alanchiao

Description

@alanchiao

Describe the bug
Pruning with high target sparsity (e.g. 0.99) causes a error.

System information

TensorFlow installed from (source or binary):

TensorFlow version: any

TensorFlow Model Optimization version: 0.2.1

Python version: any

Describe the expected behavior
Target sparsity of 0.99 should work.

Describe the current behavior
Training errors out with something like:

InvalidArgumentError: indices = -1 is not in [0, 40)
[[{{node prune_low_magnitude_dense_1/cond/cond/pruning_ops/GatherV2}}]]

Code to reproduce the issue
testPruneWithHighSparsity_Fails in prune_integration_test.py

Can search for "model-optimization/issues/215" in codebase to find unit test also.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:lowLow priority when applied. Intentionally open with no assignee or contributors welcome label.technique:pruningRegarding tfmot.sparsity.keras APIs and docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions