Code Monkey home page Code Monkey logo

Comments (5)

HuangYanfei avatar HuangYanfei commented on July 29, 2024

Checkpiont is the save dir of trained model, to test on you own instances, you need to transform your instance parameters into the VehicleRoutingDataset class in VRP.py.

from pytorch-drl4vrp.

Youzhen-Frank avatar Youzhen-Frank commented on July 29, 2024

Thanks @HuangYanfei
In the Readme file, the author says the trained weights are available, so how to use the trained model to train the new sample. I read some materials about checkpoint, but still confused.

from pytorch-drl4vrp.

Youzhen-Frank avatar Youzhen-Frank commented on July 29, 2024

I think I know how to use the checkpoint file. Folder of checkpoint files has the same path with the generated pictures.

from pytorch-drl4vrp.

Youzhen-Frank avatar Youzhen-Frank commented on July 29, 2024

Hi,

I would appreciate it if someone can tell me the correct path of 'actor.pt' and 'critic.pt' to restore checkpoint.

Thanks!

from pytorch-drl4vrp.

mveres01 avatar mveres01 commented on July 29, 2024

The readme outlines how to restore a checkpoint. If you download the sample weights folder, you can point to a given directory:

python trainer.py --task=vrp --nodes=10 --checkpoint=sample_weights/vrp10

If you want to use your own data, as @HuangYanfei mentioned, you will need to replace the VehicleRoutingDataset class. You should only need to replace from the init function, and the rest can probably be left as is.

It is important to note however, that data for this problem is generated by sampling uniformly between the interval of [0, 1]. If you are trying to apply a checkpoint directly to real-life data that comes from a different distribution, you might get different results, and would likely need to train a model from scratch

from pytorch-drl4vrp.

Related Issues (9)

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.