flax.linen# 亞麻布是亞麻布模組系統。深入了解我們在 亞麻布 README 中的設計目標。 模組 模組 apply() init() init_with_output() intercept_methods() share_scope() 初始化/應用 apply() init() init_with_output() 層 線性模組 池化 正規化 組合器 隨機 注意力 遞迴 BatchApply 啟動函數 PReLU celu() elu() gelu() glu() hard_sigmoid() hard_silu() hard_swish() hard_tanh() leaky_relu() log_sigmoid() log_softmax() logsumexp() one_hot() relu() selu() sigmoid() silu() soft_sign() softmax() softplus() standardize() swish() tanh() 初始化程式 constant() delta_orthogonal() glorot_normal() glorot_uniform() he_normal() he_uniform() kaiming_normal() kaiming_uniform() lecun_normal() lecun_uniform() normal() truncated_normal() ones() ones_init() orthogonal() uniform() variance_scaling() xavier_normal() xavier_uniform() zeros() zeros_init() 轉換 vmap() scan() jit() remat() remat_scan() map_variables() jvp() vjp() custom_vjp() while_loop() cond() switch() 檢查 tabulate() 變數字典 Variable SPMD Partitioned() with_partitioning() get_partition_spec() get_sharding() LogicallyPartitioned() logical_axis_rules() set_logical_axis_rules() get_logical_axis_rules() logical_to_mesh_axes() logical_to_mesh() logical_to_mesh_sharding() with_logical_constraint() with_logical_partitioning() 裝飾器 compact() nowrap() 分析 enable_named_call() disable_named_call() override_named_call()