-
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_strategyparameter was renamed to-multidevice_strategy. This change reflects PyTorch's ability to you any combination of CPUs and GPUs as devices. -
The
-backendparameter now has CPU backends (mkl,openmp) in addition to thecudnnbackend. Theclnnbackend 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_gradientsparameter has thus far not replicated, though you can use-content_weight 0to achieve a similar effect. -
The
-style_imageparameter 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_folderandart_dircontain style images(s). -
The
-gpuparameter now reads the charactercas the cpu instead of-1. -
The
-proto_fileparameter 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_weightsparameter 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
thinterpreter topythonorpython3. -
neural_style.luawill need the.luaextension changed to Python's.pyextension.