You have to create a TensorFlow session that contains a graph and initialized variables (initialized by TensorFlow initializers, checkpoint, SavedModel, and so on) before pruning. Vitis Optimizer TensorFlow prunes the graph in place and provides a method to export frozen pruned graphs.
The pruned graph in memory is sparse, preserving the original weight shapes while removing specific channels and setting them to zero. The exported frozen pruned graph is a slim graph with a smaller size, which means the unnecessary channels are removed.