After a few pruning iterations, a model with fewer weights is generated. The following transformation step is required to finalize the model:
$ ./vai_p_caffe transform –model float.prototxt –weights finetuned_model.caffemodel
If you fail to specify the name of the output file, a default file named transformed.caffemodel is generated. The corresponding model file is the final.prototxt generated by the prune command.
To get the FLOPs of a model, you can use the stat command:
$ ./vai_p_caffe stat –model final.prototxt
Important: The transformation
should only be executed after all pruning iterations have been completed.