Repository navigation
v0.7.0
AbstractNeuralNetworks v0.7.0
Breaking changes
The parameter container moved to its own package (#33)
NeuralNetworkParameters is gone from this package. The container now lives in NeuralNetworkParameters.jl as NetworkParameters, along with the tree walks and the HDF5 path that used to be duplicated here. No alias is left behind, so that one type has one name across the ecosystem.
# before
using AbstractNeuralNetworks: NeuralNetworkParameters
# after
using NeuralNetworkParameters: NetworkParametersNeuralNetwork now stores PT <: NetworkParameters. A model whose initialparameters returns a plain NamedTuple — a bare layer, for instance — cannot be stored in one, and now says so with an ArgumentError naming the model and the reason, instead of a MethodError against the inner constructor.
The recurrent cells were removed (#34)
Recurrent, LSTM, GRU, IdentityCell and GridCell are gone, along with src/cells/. They had not compiled against this package's own initialparameters interface since 0.6 and no test exercised them; GridCell additionally returned a Matrix of NamedTuples, which the parameter change above rules out. There is no replacement — the only consumer was GeometricMachineLearning, which is dropping its RecurrentNeuralNetwork/LSTMNeuralNetwork in step.
QPT and QPTOAT were removed (#31, #35)
These fixed a NamedTuple's keys to (:q, :p) — Hamiltonian phase-space vocabulary in a package that should not know what a Hamiltonian is. They are replaced by key-agnostic aliases:
# before
using AbstractNeuralNetworks: QPT, QPTOAT
# after
using AbstractNeuralNetworks: ArrayNamedTuple, ArrayOrNamedTupleArrayNamedTuple{T,S} is a NamedTuple of AbstractArray{T}; ArrayOrNamedTuple{T} is that or a bare array. Both are strictly wider than what they replace, so nothing that resolved before stops resolving. Neither is exported, matching the names they replace.
Bug fixes
- Losses over a
NamedTuplecould not be differentiated._norm/_diffhad genericNamedTuplefallbacks that threw under Zygote —ChainRulesCore.ProjectTohas no method for theVectorthe implementation collected — so in practice only the hardcoded(q, p)case worked. EveryNamedTuplenow differentiates, with values unchanged (#35). - A
Chainrefused anyNamedTuplethat was not(q, p).applychainis now generic in its input; a chain applies whatever its layers accept (#35). Dense'sinitialparametersnow accepts the keyword argumentsChainforwards to it, asChain's docstring has always promised (#34).
Other
AbstractLayer{M,N}now declares its type parameters in the order everything uses them (M = input, N = output). Names only; no behaviour change (#34).
Merged pull requests:
- Take the parameter container from NeuralNetworkParameters (#33) (@michakraus)
- Remove the recurrent cells (#34) (@michakraus)
- Remove QPT and QPTOAT (#35) (@michakraus)
Closed issues: