dot-calculate_style_loss: Calculate Style Loss

Description Usage Arguments Value

Description

Style loss is calculated by weighting loss from multiple layers. For each chosen layer, the loss measures the relative activation of the channels making up that layer.

Usage

1
2
3
4
5
.calculate_style_loss(
  input_style_features,
  generated_style_features,
  style_lambdas
)

Arguments

input_style_features

A list of tensors, each containing features extracted from a single layer for which style matters.

generated_style_features

A list of tensors, the same length as input_style_features, with the equivalent features from the generated image.

style_lambdas

The weights associated with each layer.

Value

A length-1 object inheriting from class "torch_tensor" with the loss between the generated layers and the style layers.


jonthegeek/stylex documentation built on Dec. 21, 2021, 2:17 a.m.