ValueError: prune_low_magnitude
can only prune an object of the following types: keras.models.Sequential, keras functional model, keras.layers.Layer, list of keras.layers.Layer. You passed an object of type: Conv2D.
#1172
Labels
bug
Something isn't working
Describe the bug
I am trying to prune MobileNetV2 model using
prune_low_magnitude
but am running into the following error.System information
TensorFlow version (installed from source or binary): 2.16.2
TensorFlow Model Optimization version (installed from source or binary): 0.8.0
Python version: 3.10.16
Describe the expected behavior
The layers should be pruned as Conv2D inherits Layer which as the error says is supported.
Describe the current behavior
Even though Conv2D inherits Layer which as the error says is supported, the code fails.
Code to reproduce the issue
The text was updated successfully, but these errors were encountered: