2

I'm trying to quantize a pruned tensorflow model using TFLite. Both the pruning and quantization work independently, but when I try to prune and then quant I get this error: ValueError: Input 0 of node sequential/prune_low_magnitude_dense/AssignVariableOp was passed float from sequential/prune_low_magnitude_dense/Mul/ReadVariableOp/resource:0 incompatible with expected resource. and when I try to quant and then prune I get this error: ValueError: 'prune_low_magnitude' can only prune an object of the following types: tf.keras.models.Sequential, tf.keras functional model, tf.keras.layers.Layer, list of tf.keras.layers.Layer. You passed an object of type: bytes.

What should I do to make these operations compatible? The model is of type tf.keras.models.Sequential, and for testing purposes is only one layer deep.

Sig
  • 91
  • 2
  • 12

1 Answers1