You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`--model`: saved model to be used for stylizing the image (eg: `mosaic.pth`)
27
27
-`--output-image`: path for saving the output image.
28
28
-`--content-scale`: factor for scaling down the content image if memory is an issue (eg: value of 2 will halve the height and width of content-image)
29
-
-`--cuda`: set it to 1 for running on GPU, 0 for CPU.
30
-
-`--mps`: set it to 1 for running on macOS GPU
29
+
-`--cuda 0|1`: set it to 1 for running on GPU, 0 for CPU.
30
+
-`--mps`: use MPS device backend.
31
+
-`--xpu`: use XPU device backend.
31
32
32
33
Train model
33
34
@@ -40,8 +41,9 @@ There are several command line arguments, the important ones are listed below
40
41
-`--dataset`: path to training dataset, the path should point to a folder containing another folder with all the training images. I used COCO 2014 Training images dataset [80K/13GB][(download)](https://cocodataset.org/#download).
41
42
-`--style-image`: path to style-image.
42
43
-`--save-model-dir`: path to folder where trained model will be saved.
43
-
-`--cuda`: set it to 1 for running on GPU, 0 for CPU.
44
-
-`--mps`: set it to 1 for running on macOS GPU
44
+
-`--cuda 0|1`: set it to 1 for running on GPU, 0 for CPU.
45
+
-`--mps`: use MPS device backend.
46
+
-`--xpu`: use XPU device backend.
45
47
46
48
Refer to `neural_style/neural_style.py` for other command line arguments. For training new models you might have to tune the values of `--content-weight` and `--style-weight`. The mosaic style model shown above was trained with `--content-weight 1e5` and `--style-weight 1e10`. The remaining 3 models were also trained with similar order of weight parameters with slight variation in the `--style-weight` (`5e10` or `1e11`).
0 commit comments