To create an input specification with shape and dtype and to use this specification to get a pruning runner, use the following command:
from tf_nndct.optimization import IterativePruningRunner
input_shape = [28, 28, 1]
input_spec = tf.TensorSpec((1, *input_shape), tf.float32)
runner = IterativePruningRunner(model, input_spec)