From 0fa2aaf6227004b2c9361c5174d3cb9f5c3462d3 Mon Sep 17 00:00:00 2001 From: Abhirath Anand <74202102+theabhirath@users.noreply.github.com> Date: Tue, 31 May 2022 06:22:11 +0530 Subject: [PATCH] Update docs for `Scale` Bump patch --- Project.toml | 2 +- src/layers/basic.jl | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index 4c1769440..56c3544bb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Lux" uuid = "b2108857-7c20-44ae-9111-449ecde12c47" authors = ["Avik Pal and contributors"] -version = "0.4.2" +version = "0.4.3" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/layers/basic.jl b/src/layers/basic.jl index 0c8f6d6df..008238ecc 100644 --- a/src/layers/basic.jl +++ b/src/layers/basic.jl @@ -691,7 +691,7 @@ Create a Sparsely Connected Layer with a very specific structure (only Diagonal ## Arguments -* `dims`: number of input and output dimensions +* `dims`: size of the learnable scale and bias parameters. * `activation`: activation function ## Keyword Arguments @@ -702,17 +702,20 @@ Create a Sparsely Connected Layer with a very specific structure (only Diagonal ## Input -* `x` must be a Matrix of size `dims × B` or a Vector of length `dims` +* `x` must be an Array of size `(dims..., B)` or `(dims...[0], ..., dims[k])` for `k ≤ size(dims)` ## Returns -* Matrix of size `dims × B` or a Vector of length `dims` +* Array of size `(dims..., B)` or `(dims...[0], ..., dims[k])` for `k ≤ size(dims)` * Empty `NamedTuple()` ## Parameters -* `weight`: Weight Vector of size `(dims,)` -* `bias`: Bias of size `(dims,)` +* `weight`: Weight Array of size `(dims...)` +* `bias`: Bias of size `(dims...)` + +!!! compat "Lux 0.4.3" + `Scale` with multiple dimensions requires at least Lux 0.4.3. """ struct Scale{bias, F1, D, F2, F3} <: AbstractExplicitLayer activation::F1