victoresque / pytorch-template

PyTorch deep learning projects made easy.
MIT License
4.7k stars 1.08k forks source link

I want to train own datasets by this template. #66

Open JasonChenhx opened 4 years ago

JasonChenhx commented 4 years ago

I want to train own datasets by this template. So How do I modify the code?

EzoBear commented 4 years ago

you can use other dataset by modifying just some. follow details.

step is constructed of 2 phase.

  1. Make DataLoader.
  2. Modify Configuration File.

first step, you can see "dataloader class" from path that pytorch-template/data_loader/data_loaders.py.

Let's extends from base dataloader class. in overrided init function, you make dataset that is supported pytorch class. if not supported dataset, you should make dataset class first. after call super's init function and put it in the first parameter.

second step, you modify config.json file from project's root directory. this template project read 'config.json' and load class file. so you just change data_loader's type from MnistDataLoader to your dataset class name created first step.

JasonChenhx commented 4 years ago

Thanks a lot. I have solved my question. Thanks again!

At 2020-02-18 12:12:26, "YoungJun, Kim" notifications@github.com wrote:

you can use other dataset by modifying just some. follow details.

step is constructed of 2 phase.

Make DataLoader. Modify Configuration File.

first step, you can see "dataloader class" from path that pytorch-template/data_loader/data_loaders.py.

Let's extends from base dataloader class. in overrided init function, you make dataset that is supported pytorch class. if not supported dataset, you should make dataset class first. after call super's init function and put it in the first parameter.

second step, you modify config.json file from project's root directory. this template project read 'config.json' and load class file. so you just change data_loader's type from MnistDataLoader to your dataset class name created first step.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.