-
Notifications
You must be signed in to change notification settings - Fork 171
Transitioning From neural style to neural style pt
While neural-style-pt is very similar to the original neural-style, there are some differences that you may have to take into account:
-
The
-multigpu_strategy
parameter was renamed to-multidevice_strategy
. This change reflects PyTorch's ability to you any combination of CPUs and GPUs as devices. -
The
-backend
parameter now has CPU backends (mkl
,openmp
) in addition to thecudnn
backend. Theclnn
backend is no longer required as non Nvidia GPUs use software to convert Nvidia backends to their format. -
The TVLoss features works a bit differently and thus will create a more "smooth" rather than blurry effect on output images.
-
The
-normalize_gradients
parameter has thus far not replicated, though you can use-content_weight 0
to achieve a similar effect. -
The
-style_image
parameter is capable of loading all the images in a folder. You can use any combination of images and image directories/folders as long as they are separated by a comma. Ex:-style_image style1.jpg,styles_folder,style2.png,art_dir
, wherestyles_folder
andart_dir
contain style images(s). -
The
-gpu
parameter now reads the characterc
as the cpu instead of-1
. -
The
-proto_file
parameter has been completely removed. Model layers and architecture are now determined based on the model's name. You can find compatible models here. -
A new
-normalize_weights
parameter has been added. Based on a feature from NeuralImageSynthesis.
For model names:
- Some model names have changed. You can find the correct model names here: https://github.com/ProGamerGov/neural-style-pt/wiki/Other-Models
For multiscale generation scripts:
-
You will have to change the
th
interpreter topython
orpython3
. -
neural_style.lua
will need the.lua
extension changed to Python's.py
extension.