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

Question about applying ckeckpoint into a real example #4

Closed
Youzhen-Frank opened this issue Apr 20, 2019 · 5 comments
Closed

Question about applying ckeckpoint into a real example #4

Youzhen-Frank opened this issue Apr 20, 2019 · 5 comments

Comments

@Youzhen-Frank
Copy link

Hi,

Could you please explain more about how to apply the checkpoint into a real example?

Thanks a lot!

@HuangYanfei
Copy link

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.

@Youzhen-Frank
Copy link
Author

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.

@Youzhen-Frank
Copy link
Author

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

@Youzhen-Frank
Copy link
Author

Hi,

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

Thanks!

@Youzhen-Frank Youzhen-Frank reopened this Apr 20, 2019
@mveres01
Copy link
Owner

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

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

No branches or pull requests

3 participants