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

Compressed model file from Channel Pruning #15

Closed
dhingratul opened this issue Nov 5, 2018 · 10 comments
Closed

Compressed model file from Channel Pruning #15

dhingratul opened this issue Nov 5, 2018 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@dhingratul
Copy link

Can you provide the optimized output from tf.Saver.save() from as the .pb file before the tflite conversion
$ ./scripts/run_local.sh nets/resnet_at_ilsvrc12_run.py \ --learner dis-chn-pruned

@jiaxiang-wu
Copy link
Contributor

Sorry, I do not fully understand your question. What do you mean by "optimized output from tf.Saver.save() from as the .pb file"?

@dhingratul
Copy link
Author

I am talking about the output from "Train the Compressed Model" in the tutorial, https://pocketflow.github.io/tutorial/. I am assuming as the next step is to export it as a TFLITE file, the output from the above step is a .pb file, I am looking for that file. I see you benchmarked your optimizations for Mobile Device, i am looking to do the same for the GPU, for which i need the .pb file before you generate the tflite file.

@jiaxiang-wu
Copy link
Contributor

tools/conversion/export_pb_tflite_models.py generates both *.pb and *.tflite model files, located in the same directory. Can you find them in the directory specified by --model_dir?

@dhingratul
Copy link
Author

The imagenet download is super slow, the last time I did that it took almost 3-4 days to complete. I just want to skip that and get the .pb file directly from that tutorial if possible.

@jiaxiang-wu
Copy link
Contributor

Sorry, ChannelPrunedLearner requires the imagenet data set to complete its training process. Maybe you can try using smaller data sets, like CIFAR-10? Some modification will be required:

  1. nets/resnet_at_ilsvrc12_run.py -> nets/resnet_at_cifar10_run.py
  2. In ImageClassifierFloatResNet.java, change the image size and label file.

@dhingratul
Copy link
Author

Yes, i understand, i was hoping that you have that you make the optimized model(after pruning) available so that i can do some benchmarks to make sure the results in terms of gains is reproducible on my machine.

@jiaxiang-wu
Copy link
Contributor

Okay, we will release pre-trained compressed models for some selected pruning ratio in the next few weeks.

@jiaxiang-wu jiaxiang-wu self-assigned this Nov 9, 2018
@jiaxiang-wu jiaxiang-wu added the enhancement New feature or request label Nov 9, 2018
@jiaxiang-wu
Copy link
Contributor

Enhancement required: release a few pre-trained compressed models for benchmark test.

@dhingratul
Copy link
Author

@jiaxiang-wu Were you able to publish the pre-trained compressed models ?

@jiaxiang-wu
Copy link
Contributor

@dhingratul We will, but it may take some time.

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

No branches or pull requests

2 participants