Open digitalheir opened 4 years ago
@liyunlu0618 : do you have time to look into this now? Otherwise, I'll get back to this in 2 - 3 weeks.
@digitalheir : will not be able to get to this right now. If this blocks you (and you're not able to make use of pruning in other ways), please let us know.
That's fine. Pruning is not a blocking issue for me. I wanted to optimize my model for mobile and got good results too with just quantization. Thanks for the swift response!
Hello, is there a way to solve that problem? We can't even make the following tutorial work https://github.com/tensorflow/model-optimization/blob/master/tensorflow_model_optimization/g3doc/guide/pruning/pruning_with_keras.ipynb I would be interested in pruning. Thanks!
Describe the bug Follow along with MNIST siamese, where one set of weights is used twice in the same network. Try to make one layer prune, get error:
tensorflow.python.framework.errors_impl.InvalidArgumentError: assertion failed: [Prune() wrapper requires the UpdatePruningStep callback to be provided during training. Please add it as a callback to your model.fit call.] [Condition x >= y did not hold element-wise:x (assert_greater_equal/ReadVariableOp:0) = ]
. Even though you supply the pruning callback tofit()
:System information
TensorFlow installed from (source or binary): binary
TensorFlow version: 2.1.0
TensorFlow Model Optimization version: 0.2.1
Python version: 3.6.10
Describe the expected behavior Script doesn't crash
Describe the current behavior Script crashes
Code to reproduce the issue
Additional context Might have something to do with referencing the same layers twice in a model.