Git Product home page Git Product logo

Comments (6)

tianyic avatar tianyic commented on June 7, 2024 1

Thanks for reaching out. The error looks like your torch version is not supported. Could you provide the torch version?

from only_train_once.

Smarter-version avatar Smarter-version commented on June 7, 2024

Thank you for your reply. The version I use is torch1.12.1, onnx1.15.0, only_train_once3.0.0. Also I would like to ask how mark_unprunable_by_node_ids is determined, and if don't add the mark_unprunable_by_node_ids parameter, will it have any effect?

from only_train_once.

tianyic avatar tianyic commented on June 7, 2024

torch==1.12 is not supported by OTO. We recommend to upgrade torch>=2.0.

Marking node groups as unprunable is to skip unsupported pattern and focuses on pruning over the remaining sub-graphs. For Yolov5, the skipped node-groups could be found at yolo_v5. Different torch version may have varying node-ids, thereby may need to some adjustments. Ideally and typically, there is no need to manually set up such stuffs. The principle for setup is to write a sanity check over a DNN. During sanity check, if there exists some error happening during sub-network validation, mark the node groups corresponding to where the errors came from is a common routine to mark unprunable.

Meanwhile, the potential efforts of setting up unprunable node groups could be gradually relieved following the further developments and evolutions of pruning dependency graph. Current graph analysis in both OTO and torch-pruning still have room for advanced automation.

from only_train_once.

Smarter-version avatar Smarter-version commented on June 7, 2024

thanks, it works. I have tried torch-pruning before, but the results are not rational, for yolov5 pruning 30% accuracy degradation will be more serious, have you tried to compare OTO and torch-pruning on yolov5?

from only_train_once.

tianyic avatar tianyic commented on June 7, 2024

@jiao1234567 Glad to hear it works.

For accuracy, I assume that you used the optimizer setup presented in the tutorial for resnet18 cifar10. I would say you may want to try fine-tune the hyperparameters to make it competitive. We recommend to set up the hyperparameters to be exactly the same as the baseline optimizer. Meanwhile, some experiments need to enlarge training steps for convergence.

I personally did not try Yolov5 due to limited bandwidth, yet one of my colleagues tried OTO on YOLO over COCO. Actually target-group-sparsity as 0.3 if that is the pruning ratio you used should not have significant acc degradation based on his experience if training pipeline is properly setup. My colleague's personal suggestion is to double check the first_momentum setup, which default value of SGD is 0, yet recommended set as 0.9 for COCO. See the below table and curve.

IMG_0083
IMG_0084
IMG_0085

from only_train_once.

tianyic avatar tianyic commented on June 7, 2024

Closed as the topic has been completed. Feel free to open a new issue regarding accuracy if still have regression. Our official tutorial on yolo will be released on the early of next year along with the release of HESSO optimizer technical report. A tutorial README is uploaded here.

from only_train_once.

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.