diff --git a/latest/backends.html b/latest/backends.html
new file mode 100644
index 00000000..2a89208c
--- /dev/null
+++ b/latest/backends.html
@@ -0,0 +1,160 @@
+
+
+
+
@@ -183,16 +193,20 @@ This is much better: we can now make as many affine layers as we want. This is a
@net type MyAffine
W
b
- x -> W * x + b
+ x -> x * W + b
end
The function provided,
-x -> W * x + b
+x -> x * W + b
, will be used when
MyAffine
is used as a model; it's just a shorter way of defining the
(::MyAffine)(x)
- method above.
+ method above. (You may notice that
+W
+ and
+x
+ have swapped order in the model; this is due to the way batching works, which will be covered in more detail later on.)
However,
@@ -244,7 +258,7 @@ Clearly, the
x
. The
Affine
- layer fits the bill so we can instantiate
+ layer fits the bill, so we can instantiate
TLP
with two of them:
@@ -290,12 +304,13 @@ However, for convenience and to avoid errors, we'd probably rather specify t
This is easy to implement using the usual Julia syntax for constructors:
-Affine(in::Integer, out::Integer) = Affine(randn(in, out), randn(1, out))
+Affine(in::Integer, out::Integer) =
+ Affine(randn(in, out), randn(1, out))
In practice, these constructors tend to take the parameter initialisation function as an argument so that it's more easily customisable, and use
Flux.initn
by default (which is equivalent to
-randn()/100
+randn(...)/100
). So
Affine
's constructor really looks like this:
@@ -309,10 +324,10 @@ Supported syntax
The syntax used to define a forward pass like
-x -> W*x + b
+x -> x*W + b
behaves exactly like Julia code for the most part. However, it's important to remember that it's defining a dataflow graph, not a general Julia expression. In practice this means that anything side-effectful, or things like control flow and
println
-s, won't work as expected. In future we'll continue expand support for Julia syntax and features.
+s, won't work as expected. In future we'll continue to expand support for Julia syntax and features.