Added AbstractPullback
and NetworkLoss
.
#53
Annotations
2 errors
Documentation:
src/losses.jl#L46
doctest failure in ~/work/AbstractNeuralNetworks.jl/AbstractNeuralNetworks.jl/src/losses.jl:46-65
```jldoctest
using GeometricMachineLearning
using LinearAlgebra: norm
import Random
Random.seed!(123)
const d = 2
arch = Chain(Dense(d, d), Dense(d, d))
nn = NeuralNetwork(arch)
input_vec = [1., 2.]
output_vec = [3., 4.]
loss = FeedForwardLoss()
loss(nn, input_vec, output_vec) ≈ norm(output_vec - nn(input_vec)) / norm(output_vec)
# output
true
```
Subexpression:
using GeometricMachineLearning
using LinearAlgebra: norm
import Random
Random.seed!(123)
const d = 2
arch = Chain(Dense(d, d), Dense(d, d))
nn = NeuralNetwork(arch)
input_vec = [1., 2.]
output_vec = [3., 4.]
loss = FeedForwardLoss()
loss(nn, input_vec, output_vec) ≈ norm(output_vec - nn(input_vec)) / norm(output_vec)
Evaluated output:
ERROR: ArgumentError: Package GeometricMachineLearning not found in current path.
- Run `import Pkg; Pkg.add("GeometricMachineLearning")` to install the GeometricMachineLearning package.
Stacktrace:
[1] macro expansion
@ ./loading.jl:2223 [inlined]
[2] macro expansion
@ ./lock.jl:273 [inlined]
[3] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:2198
[4] #invoke_in_world#3
@ ./essentials.jl:1089 [inlined]
[5] invoke_in_world
@ ./essentials.jl:1086 [inlined]
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:2191
Expected output:
true
diff =
Warning: Diff output requires color.
trueERROR: ArgumentError: Package GeometricMachineLearning not found in current path.
- Run `import Pkg; Pkg.add("GeometricMachineLearning")` to install the GeometricMachineLearning package.
Stacktrace:
[1] macro expansion
@ ./loading.jl:2223 [inlined]
[2] macro expansion
@ ./lock.jl:273 [inlined]
[3] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:2198
[4] #invoke_in_world#3
@ ./essentials.jl:1089 [inlined]
[5] invoke_in_world
@ ./essentials.jl:1086 [inlined]
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:2191
|
Documentation
Process completed with exit code 1.
|