Diffusers 文档
激活函数
加入 Hugging Face 社区
并获取增强的文档体验
开始使用
激活函数
自定义激活函数,用于支持 🤗 Diffusers 中的各种模型。
GELU
类 diffusers.models.activations.GELU
< source >( dim_in: int dim_out: int approximate: str = 'none' bias: bool = True )
GELU 激活函数,支持使用 approximate="tanh"
进行 tanh 近似。
GEGLU
类 diffusers.models.activations.GEGLU
< source >( dim_in: int dim_out: int bias: bool = True )
门控线性单元激活函数的 变体。
ApproximateGELU (近似GELU)
class diffusers.models.activations.ApproximateGELU
< source (源代码) >( dim_in: int dim_out: int bias: bool = True )
高斯误差线性单元 (GELU) 的近似形式。 更多细节请参阅这篇论文的第 2 节。