# Losses

For losses to be used, `custom_loss` must be specified for that particular class. Currently there can be a total of four classes, `saturation`, `smoothness`, `symmetry`, and `palette`. To enable all losses use this syntax: separate loss names by commas, using a big string.

```
custom_loss="saturation, smoothness, symmetry, palette"
```

## `Saturation Loss`

```
custom_loss="saturation"
```

### `saturation_weight`

> Default: `1`

Creates a loss based on how colorful the image is, encourages the image to become more colorful.

![saturation](/files/pegieELS97ivsN17CxCj)

## `Smoothness Loss`

```
custom_loss="smoothness"
```

### `smoothness_weight`

> Default: `1`

![smoothness](/files/K0H71HFpNr1iudGnTGSB)

## `Symmetry Loss`

```
custom_loss="symmetry"
```

### `saturation_weight`

> Default: `1`

![symemtry](/files/2tzAYDjo0EDO9YxCTvey)

## `Palette Loss`

```
custom_loss="palette"
```

### `palette_weight`

> Default: `1`

![palette](/files/N8Bhx2r32VAFMnK6GE9T)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dazhizhong.gitbook.io/pixray-docs/docs/losses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
