Buckets:

hf-doc-build/doc / diffusers /v0.43.0 /ru /api /activations.md
mishig's picture
|
download
raw
4.5 kB

Функции активации

Пользовательские функции активации для поддержки различных моделей в 🤗 Diffusers.

GELU[[diffusers.models.activations.GELU]]

diffusers.models.activations.GELU[[diffusers.models.activations.GELU]]

diffusers.models.activations.GELU(dim_in: int, dim_out: int, approximate: str = 'none', bias: bool = True)

Источник

Параметры:

dim_in (int) : количество каналов на входе.

dim_out (int) : Количество каналов на выходе.

approximate (str, необязательный, по умолчанию "none") : Если "tanh", используется приближение tanh.

bias (bool, по умолчанию True) : Использовать ли смещение (bias) в линейном слое.

Функция активации GELU с поддержкой аппроксимации tanh при approximate="tanh".

GEGLU[[diffusers.models.activations.GEGLU]]

diffusers.models.activations.GEGLU[[diffusers.models.activations.GEGLU]]

diffusers.models.activations.GEGLU(dim_in: int, dim_out: int, bias: bool = True)

Источник

Параметры:

dim_in (int) : количество каналов на входе.

dim_out (int) : Количество каналов на выходе.

bias (bool, по умолчанию True) : Использовать ли смещение (bias) в линейном слое.

Вариант функции активации gated linear unit.

ApproximateGELU[[diffusers.models.activations.ApproximateGELU]]

diffusers.models.activations.ApproximateGELU[[diffusers.models.activations.ApproximateGELU]]

diffusers.models.activations.ApproximateGELU(dim_in: int, dim_out: int, bias: bool = True)

Источник

Параметры:

dim_in (int) : количество каналов на входе.

dim_out (int) : Количество каналов на выходе.

bias (bool, по умолчанию True) : Использовать ли смещение (bias) в линейном слое.

Приближённая форма функции активации Gaussian Error Linear Unit (GELU). Дополнительные сведения см. в разделе 2 этой статьи.

SwiGLU[[diffusers.models.activations.SwiGLU]]

diffusers.models.activations.SwiGLU[[diffusers.models.activations.SwiGLU]]

diffusers.models.activations.SwiGLU(dim_in: int, dim_out: int, bias: bool = True)

Источник

Параметры:

dim_in (int) : количество каналов на входе.

dim_out (int) : Количество каналов на выходе.

bias (bool, по умолчанию True) : Использовать ли смещение (bias) в линейном слое.

Вариант функции активации gated linear unit. Похожа на GEGLU, но использует SiLU / Swish вместо GeLU.

FP32SiLU[[diffusers.models.activations.FP32SiLU]]

diffusers.models.activations.FP32SiLU[[diffusers.models.activations.FP32SiLU]]

diffusers.models.activations.FP32SiLU()

Источник

Функция активации SiLU с входом, преобразованным в torch.float32.

LinearActivation[[diffusers.models.activations.LinearActivation]]

diffusers.models.activations.LinearActivation[[diffusers.models.activations.LinearActivation]]

diffusers.models.activations.LinearActivation(dim_in: int, dim_out: int, bias: bool = True, activation: str = 'silu')

Источник

Xet Storage Details

Size:
4.5 kB
·
Xet hash:
481e182b2eea5d765a30fbc2a397c8a6ab9ec4a32bd7da2098617383fd02c2c4

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.