函数#
不带参数的层(例如激活函数)也作为简单函数提供。
elu(x, alpha=1.0) |
|
celu(x, alpha=1.0) |
|
gelu(x) -> mlx.core.array |
|
gelu_approx(x) |
|
gelu_fast_approx(x) |
|
|
应用门控线性单元函数。 |
hard_shrink(x, lambd=0.5) |
|
hard_tanh(x, min_val=-1.0, max_val=1.0) |
|
hardswish(x) |
|
leaky_relu(x, negative_slope=0.01) |
|
log_sigmoid(x) |
|
log_softmax(x, axis=-1) |
|
mlx.core.array) -> mlx.core.array |
|
mlx.core.array) -> mlx.core.array |
|
relu(x) |
|
relu6(x) |
|
selu(x) |
|
sigmoid(x) |
|
silu(x) |
|
softmax(x, axis=-1) |
|
softmin(x, axis=-1) |
|
softplus(x) |
|
float = 0.5) |
|
float = 0.0) |
|
|
应用双曲正切函数。 |