Comments (2)
It appears that recent changes in ComponentArrays.jl have broken the parameter collection.
On ComponentArrays v0.15.10 we had
julia> using Flux, ComponentArrays
julia> w = ComponentArray(a=1.0, b=[2, 1, 4], c=(a=2, b=[1, 2]))
ComponentVector{Float64}(a = 1.0, b = [2.0, 1.0, 4.0], c = (a = 2.0, b = [1.0, 2.0]))
julia> ps = Flux.params(w)
Params([(a = 1.0, b = [2.0, 1.0, 4.0], c = (a = 2.0, b = [1.0, 2.0]))])
julia> ps[1]
ComponentVector{Float64}(a = 1.0, b = [2.0, 1.0, 4.0], c = (a = 2.0, b = [1.0, 2.0]))
julia> gs = gradient(() -> sum(w.a) + sum(w.c.b), ps)
Grads(...)
julia> gradient(() -> sum(w.a) + sum(w.c.b), ps)[ps[1]]
ComponentVector{Float64}(a = 1.0, b = [0.0, 0.0, 0.0], c = (a = 0.0, b = [1.0, 1.0]))
On ComponentArrays v0.15.11 instead
julia> w = ComponentArray(a=1.0, b=[2, 1, 4], c=(a=2, b=[1, 2]))
ComponentVector{Float64}(a = 1.0, b = [2.0, 1.0, 4.0], c = (a = 2.0, b = [1.0, 2.0]))
julia> ps = Flux.params(w)
Params([[2.0, 1.0, 4.0], [1.0, 2.0]])
julia> ps[1]
3-element Vector{Float64}:
2.0
1.0
4.0
julia> gs = gradient(() -> sum(w.a) + sum(w.c.b), ps)
Grads(...)
julia> gradient(() -> sum(w.a) + sum(w.c.b), ps)[ps[1]] # nothing
Could jonniedie/ComponentArrays.jl#252 be the responsible? cc @avik-pal
from flux.jl.
https://github.com/jonniedie/ComponentArrays.jl/blob/main/src%2Fcompat%2Ffunctors.jl was added.
from flux.jl.
Related Issues (20)
- Dimensions check for `Conv` is incomplete, leading to confusing error HOT 1
- 2x performance regression due to 5e80211c3302b5e7b79b4f670498f5a68af6659b HOT 2
- Why is Flux.destructure type unstable? HOT 3
- bad formatting for PairwiseFusion docstring HOT 1
- Zero-sized arrays cannot be applied to Dense layers. HOT 4
- Adding Simple Recurrent Unit as a recurrent layer
- Collecting PyTorch -> Flux migration notes
- deprecate Flux.params HOT 7
- Significant time spent moving medium-size arrays to GPU, type instability HOT 10
- ConvTranspose errors with symmetric non-constant pad
- SamePad() for even sized filters.
- Dense layers with shared parameters HOT 5
- Implementation of `AdamW` differs from PyTorch HOT 10
- `gpu` should warn if cuDNN is not installed HOT 2
- Cannot take `gradient` of L2 regularization loss HOT 1
- Create a flag to use Enzyme as the AD in training/etc. HOT 13
- test Enzyme gradient for loss functions
- test Enzyme gpu support
- Enzyme fails with MultiHeadAttention layer HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flux.jl.