This package implements abstract and general data structures for the construction of neural networks, e.g., layers, chains, and architectures. It mainly serves as a common base package for GeometricMachineLearning.jl and SymbolicNetworks.jl.
The parameters of a network live in NeuralNetworkParameters.jl, as NetworkParameters, together with the tree walks, the flat form and the HDF5 path that go with them. params(nn) returns one:
using AbstractNeuralNetworks
using NeuralNetworkParameters: NetworkParameters
nn = NeuralNetwork(Chain(Dense(4, 3, tanh), Dense(3, 2, tanh)))
params(nn) isa NetworkParameters # trueUp to 0.6 this package defined and exported a struct of its own called NeuralNetworkParameters. As of 0.7 that name is gone from here — it is not aliased either, so that one type has one name across the ecosystem. Replace
using AbstractNeuralNetworks # NeuralNetworkParameters came along
import AbstractNeuralNetworks: NeuralNetworkParameterswith
using NeuralNetworkParameters: NetworkParametersand add NeuralNetworkParameters to your Project.toml. The type object is the same one, so ::Type{} dispatch, <: bounds and NetworkParameters{keys}(vals) construction all behave as they did. params, h5save, h5load, save and load are still importable from AbstractNeuralNetworks.
We are using git hooks, e.g., to enforce that all tests pass before pushing. In order to activate these hooks, the following command must be executed once:
git config core.hooksPath .githooks