dot-calculate_style_layer_loss: Calculate Style Layer Loss

Description Usage Arguments Value

Description

The style loss for each layer is calculated by comparing the Gram matrix for that style layer to the Gram matrix for the equivalent generated layer. The intention is for this to act as a measurement that the different channels that make up a layer are activated to the same proportion between the style layer and the generated layer. For example, if this layer "cares" that all vertical lines in the style layer are orange, measure how untrue that is for the generated layer.

Usage

1
.calculate_style_layer_loss(style_layer, generated_layer)

Arguments

style_layer

Features extracted from a single style layer.

generated_layer

Features extracted from a single generated layer. Should be the same layer as style_layer.

Value

A scalar torch_tensor representing the loss for this layer.


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