dot-calculate_content_loss: Calculate Content Loss

Description Usage Arguments Value

Description

Content loss is calculated by comparing tensor output from the target content layer to the tensor output from the generated layer.

Usage

1
.calculate_content_loss(content_layer, generated_layer)

Arguments

content_layer

Features extracted from a specific layer of the content image.

generated_layer

Features extracted from the same layer of the generated image. The tensor must be the same shape as the content image. A common cause for error is the content image and the generated image having different height and/or width.

Value

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


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