Code Monkey home page Code Monkey logo

Comments (9)

jiaxiang-wu avatar jiaxiang-wu commented on July 19, 2024
  1. We are considering unifying the save path arguments for model compression components. For instance, all model compression components should write the training graph (and variables) to mc_save_path and the evaluation graph (and variables) to mc_save_path_eval.

  2. Yes, save_path means the save path of the full-precision uncompressed network, particularly the training graph (and variables). The evaluation graph (and variables) is written to save_path_eval.

The reason for saving both training and evaluation graph is that, to continue from previously-aborted training, you need the training graph, and to export a TF-Lite model from checkpoint files, you need the evaluation graph.

from pocketflow.

as754770178 avatar as754770178 commented on July 19, 2024
  1. Can I understand the parameter save_path and save_path_eval is written in full-prec mode, and is read in other(compress model) mode? The parameter dcp_save_path and dcp_save_path_eval is written when compress the model?

  2. If 1 is right. When I compress my custom model, can I don't provide the model in save_path_eval?
    save_path_eval is only read when exec the funciton forward_eval in ModelHelper class?

from pocketflow.

jiaxiang-wu avatar jiaxiang-wu commented on July 19, 2024
  1. save_path & save_path_eval is written by the FullPrecLearner, and dcp_save_path & dcp_save_path_eval is written by the DisChnPrunedLearner. When running model compression components, only save_path is required to load a pre-trained uncompressed model.
  2. As mentioned above, for model compression components, only save_path is required. You do not need to provide the save_path_eval. All save paths with a suffix "_eval" is only used for exporting TF-Lite models. They are not required in the training process.

from pocketflow.

as754770178 avatar as754770178 commented on July 19, 2024

I don't found the parameter that specify the save path of compressed model other than DisChnPrunedLearner mode, but I want to know you how to specify the path ? and I found some variable w.r.t path is specified to fixed value, such as channel_pruned_path = './models/pruned_model.ckpt' best_model_path = './models/best_model.ckpt', Can you tell me what does they mean?

from pocketflow.

jiaxiang-wu avatar jiaxiang-wu commented on July 19, 2024

For instance, UniformQuantTFLearner uses uqtf_save_path for saving the training graph and uqtf_save_path_eval for saving the evaluation graph.

For channel_pruned_path and best_model_path used in the ChannelPrunedLearner, @psyyz10 , could you please take a look and explain their actual usage?

from pocketflow.

psyyz10 avatar psyyz10 commented on July 19, 2024

@as754770178 in ChannelPrunedLearner, best_model_path is the parameter that specify the save path of compressed model and channel_pruned_path saved some intermediate results

from pocketflow.

as754770178 avatar as754770178 commented on July 19, 2024

I conclude the parameter about the path.

  1. ChannelPrunedLearner
    best_model_path is the parameter that specify the save path of compressed model and channel_pruned_path saved some intermediate results. Now, best_model_path changed to cp_best_paht; channel_pruned_path changed to cp_channel_pruned_path. But I doubt that what does cp_original_path mean, whether it conflict with save_path.

  2. UniformQuanTFLearner
    uqtf_save_path_eval is the parameter that specify the save path of compressed model and uqtf_save_path saved some intermediate results.

  3. DisChnPrunedLearner
    dcp_save_path_eval is the parameter that specify the save path of compressed model and dcp_save_path saved some intermediate results.

  4. FullPrecLearner
    save_path_eval is the parameter that specify the save path of compressed model and save_path saved some intermediate results.

  5. NonUniformQuantLearner
    nuql_save_quant_model_path is the parameter that specify the save path of compressed model.

  6. UniformQuantLearner
    uql_save_quant_model_path is the parameter that specify the save path of compressed model.

  7. WeightSparseLearner
    ws_save_path is the parameter that specify the save path of compressed model.
    Why NonUniformQuantLearner, UniformQuantLearner and WeightSparseLearner don't have the parameter to set the path saved some intermediate results.

I don't know whether my summary is correct?

from pocketflow.

jiaxiang-wu avatar jiaxiang-wu commented on July 19, 2024

@as754770178

For UniformQuanTFLearner, DisChnPrunedLearner, and FullPrecLearner:

  • The model saving path without the "_eval" suffix is used to store checkpoint files from the training graph. You can recover a previous training process from it.
  • The model saving path with the "_eval" suffix is used to store checkpoint files from the evaluation graph. You can export *.pb & *.tflite models from it.

For NonUniformQuantLearner, UniformQuantLearner, and WeightSparseLearner:

  • The model saving path without the "_eval" suffix is used to store checkpoint files from the training graph. You can recover a previous training process from it.
  • There is no model saving path with the "_eval" suffix is used to store checkpoint files from the evaluation graph, since these three learners does not support inference using *.tflite models.

For ChannelPrunedLearner, @psyyz10 , could you provide some more explanation?

from pocketflow.

psyyz10 avatar psyyz10 commented on July 19, 2024

@as754770178 cp_original_path is also a path to save temporal model, but the different temporal model from cp_channel_pruned_path. User may do some operations, for example changed model scope, and which can be saved to cp_original_path.

from pocketflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.