chainer-fast-neuralstyle icon indicating copy to clipboard operation
chainer-fast-neuralstyle copied to clipboard

How to train a new model?

Open linrio opened this issue 7 years ago • 1 comments

In the model file, It has two exampled model. How two train a new kind of model? Like starry_night etc?

linrio avatar Apr 14 '17 04:04 linrio

Use the train.py script to build a new model.

Template for train.py looks like this: python train.py -s <style_image_path> -d <training_dataset_path> -g <use_gpu ? gpu_id : -1>

A specific example could look like this: python train.py -s ./StarryNight.jpg -d ./train2014 -o /StarryNight/StarryNight -g 0

That specific example assumes you extracted the Microsoft COCO dataset to the train2014 folder and want to use GPU with ID 0. You'll want to create the StarryNight output folder too, else you'll get an error while the model is written to disk.

HappyCoderMan avatar Apr 14 '17 18:04 HappyCoderMan