Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compress model in Multi-machine #35

Closed
as754770178 opened this issue Nov 8, 2018 · 12 comments
Closed

How to compress model in Multi-machine #35

as754770178 opened this issue Nov 8, 2018 · 12 comments

Comments

@as754770178
Copy link

I want to compress the model in How to compress model in Multi-machine

@jiaxiang-wu
Copy link
Contributor

You mean how to train a compressed model with multiple nodes/machines?

@xieydd
Copy link

xieydd commented Nov 9, 2018

When using the horovod, i think it`s feasible.

@as754770178
Copy link
Author

as754770178 commented Nov 9, 2018

Yes, but I mean compress the model by Prunning/Quantization, then train the compress model with multiple nodes/machines.

I have other questions:

  1. Can PocketFlow compress object detection network, such as Yolo, fasterCNN?
  2. I how to verify the inference speed of compressed model is faster than the full-precision uncompressed network?

thanks

@as754770178
Copy link
Author

When using the horovod, i think it`s feasible.

What's it?

@xieydd
Copy link

xieydd commented Nov 9, 2018

Horovod is Distributed training framework for TensorFlow, Keras, and PyTorch.

  1. AFAIK,it not yet support the state-of-art models lke the Yolo or fasterCNN
  2. you can test in TensorRT
    @as754770178

@as754770178
Copy link
Author

I exec command ./scripts/run_local.sh nets/resnet_at_cifar10_run.py --learner dis-chn-pruned.

I read the checkpoint file of compressed model (saved in models_dcp_eval file) and pre-trained model, but I find the structure of net is same. Compressed model only delete the variable w.r.t Momentum and BatchNorm.
So I want to test the inference speed of compressed model and full-precision uncompressed network

@jiaxiang-wu
Copy link
Contributor

@as754770178

  1. PocketFlow does not support object detection models (YOLO / Faster R-CNN) for the moment. We are working on this right now.
  2. For multi-node training, please use horovod, as suggested by @xieydd .
  3. To verify the inference speed, use TF-Lite models generated by tools/conversion/export_pb_tflite_models.py.

@as754770178
Copy link
Author

I mean use tf-serving to test the speed? Can horovod support compress model? I want compress model and train it together, like PocketFlow.

@jiaxiang-wu
Copy link
Contributor

  1. Horovod is a distributed training framework. It does not care what code is running within.
  2. The speed improvement on GPU will be less significant than on ARM-based mobile devices, according to our experience.

@as754770178
Copy link
Author

Can PocketFlow compress multi-label Classification network?

@jiaxiang-wu
Copy link
Contributor

Yes, you can define a new ModelHelper class, including the network architecture and the computation of loss function's value, similar to other ModelHelper classes defined under the nets directory.

@as754770178
Copy link
Author

OK, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants