pystiche_papers.ulyanov_et_al_2016
The authors published an improved version :cite:`UVL2017` of their initial paper
:cite:`ULVL2016` with only a single but significant change: they developed
:class:`~torch.nn.InstanceNorm2d` and used it as drop-in replacement for
:class:`~torch.nn.BatchNorm2d` layers. To account for this we provide instance_norm
flag, which defaults to True
.
The original authors also use the same repository for both implementations and only
differentiate between them with the branches:
.. seealso::
:ref:`Paper implementations <impl_params>`
The following parts are affected:
.. seealso::
:ref:`Paper implementations <impl_params>`
Although there are four possible combinations for impl_params
and instance_norm
only three are listed below. Since the hyper-parameters in both papers are equal,
both combinations with ìmpl_params=False
are equal and thus not reported.
Parameter
impl_params
/ ìnstance_norm
True
/ True
True
/ False
False
layer
"relu4_2"
score_weight
1e0
6e-1
1e0
Parameter
impl_params
True
/ True
True
/ False
False
layers
("relu1_1", "relu2_1", "relu3_1", "relu4_1")
("relu1_1", "relu2_1", "relu3_1", "relu4_1", "relu5_1")
layer_weights
"sum"
score_weight
1e0
1e3
1e0
Parameter
Value
edge_size
256
Parameter
impl_params
/ ìnstance_norm
True
/ True
True
/ False
False
edge_size
256
edge
"long"
interpolation_mode
"bicubic"
"bilinear"
Parameter
impl_params
/ ìnstance_norm
True
/ True
True
/ False
False
num_batches
2_000
300
200
batch_size
1
4
16
Parameter
impl_params
/ ìnstance_norm
True
/ True
True
/ False
False
lr
1e-3
1e0
Parameter
impl_params
/ ìnstance_norm
True
/ True
True
/ False
False
lr_decay
0.8
0.7
delay
0
4
Parameter
impl_params
/ ìnstance_norm
True
/ True
True
/ False
False
num_epochs
25
10
.. automodule:: pystiche_papers.ulyanov_et_al_2016
.. autofunction:: content_transform
.. autofunction:: style_transform
.. autofunction:: images
.. autofunction:: dataset
.. autofunction:: image_loader
.. autofunction:: content_loss
.. autoclass:: GramLoss
.. autofunction:: style_loss
.. autofunction:: perceptual_loss
.. autofunction:: transformer
.. autofunction:: training
.. autofunction:: stylization
.. autofunction:: hyper_parameters
.. autofunction:: multi_layer_encoder
.. autofunction:: preprocessor
.. autofunction:: postprocessor
.. autofunction:: optimizer
.. autofunction:: lr_scheduler