Giter Club home page Giter Club logo

Comments (5)

thijsgelton avatar thijsgelton commented on June 5, 2024

Could it be that you cannot run on GPU when training using sparseml.ultralytics.train ? It seems that when I switch to a CPU kaggle environment that I am able to train the model.

from sparseml.

thijsgelton avatar thijsgelton commented on June 5, 2024

I got it to work eventually. I seems that running it distributed wasn't favourable. Probably adding the required pre-statement in front of it could fix that, but for now running it on a single GPU works.

from sparseml.

imAhmadAsghar avatar imAhmadAsghar commented on June 5, 2024

@thijsgelton Hi, Can you please tell me what exactly you did to load the pruned and quantized model successfully? Currently, I have yolov8n that I trained with the quantized recipe but I can not load it, unfortunately.

from sparseml.

thijsgelton avatar thijsgelton commented on June 5, 2024

Eventually I was able to run it using the following command on kaggle with 2 T4's (so distributed):

subprocess.run([
    "python", "-m", "torch.distributed.run", "--no_python", "--nproc_per_node", "2",
    "sparseml.ultralytics.train",
    "--model",
    "/kaggle/working/runs/detect/train/weights/best.pt",
  '--recipe',
    "zoo:cv/detection/yolov8-m/pytorch/ultralytics/voc/pruned80-none",
  '--data',
    "/kaggle/working/spaceship.yaml", "--batch=32", '--lr0', '0.0015', '--lrf=0.1', '--momentum', '0.85', '--mosaic', '0.95', '--mixup', '0.15', '--scale', '0.9',
'--recipe_args', '{"num_epochs": 50}', "--resume"])

from sparseml.

imAhmadAsghar avatar imAhmadAsghar commented on June 5, 2024

@thijsgelton, I have trained the model using a quantization recipe. I am getting RuntimeError: Error(s) in loading state_dict for DetectionModel: Missing key(s) in state_dict: "model.0.conv.quant.activation_post_process.scale"...... while converting the trained model to onnx. I could not figure out the problem yet.

from sparseml.

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.