Comments (2)
This is something I've wanted to implement for a while, and even made up a quick prototype for a few months back. It's nice for state-space modeling too because you can have a C*x + D*u
output signal. Also, activation functions for NNs.
This syntax is better than the one I had, too. Although, my preference would be to have the function as the first argument.
Time permitting, I'm going to try to get something working within the next few days. There are a few changes that will have to be made to get this working, but nothing that will require too much major surgery.
from componentarrays.jl.
I think the first time I read this I missed the significance of the fact that it's looking at the upper level. Most of the use cases I have for alias components are applying functions to components within the same level.
So really this is two separate issues:
- We need to have alias components
- Those aliases should have a way to reference the components above them
I'd like to have a way to accomplish the first without having to have a ThisLevel
.
My original thoughts were something like:
x = ComponentArray(
a = 1,
b = 2,
c = AliasVar(x -> x.a + x.b)
)
So AliasVar
would always take in a function of one variable, which is the ComponentArray
that holds the AliasVar
(in this case x
). Maybe a way of accomplishing both would be something like:
x = ComponentArray(
comp1 = ComponentArray(out = 1),
comp2 = ComponentArray(in = AliasVar(x -> fun(UpperLevel(x).comp1.out))),
)
It's a little more verbose for this case, but it handles the first case without having to introduce a ThisLevel
. Also, I think this makes it more straightforward to understand for the case where you might want to go even higher level like UpperLevel(UpperLevel(x))
.
from componentarrays.jl.
Related Issues (20)
- error on empty array of named tuples
- vcat ambiguity with SparseArrays method HOT 2
- add missing LinearAlgebra methods on GPU
- Problem with `Zygote.hessian` HOT 1
- `lmul!` fails with Component Array on GPU
- Incorrect gradient type. HOT 2
- Scalar indexing on GPU when computing `Zygote.gradient` of `dot(x::CA, x::CA)`
- Method ambiguities reported by Aqua
- getting "Only homogeneous arrays are allowed" error for Vector{SVector} HOT 4
- How to get index range of subarray? HOT 3
- Extend KeepIndex to Vector indices HOT 1
- Nine broken tests for Test Summary: | Pass Broken Total Time Broadcasting | 30 9 39 7.2s HOT 1
- The ComponentArray type that can specify the properties of the ComponentArray object
- Indexing `ComponentMatrix` with `FlatAxis` components HOT 4
- `Diagonal(ComponentArray)` scalar indexing error HOT 1
- ComponentVectors are not stack-able HOT 10
- ComponentArray errors with `findall`
- Can't index component array with shaped components with subset of keys HOT 2
- FR: Preserve CA-ness when indexing component matrix with shaped components HOT 1
- Get rid of `ComponentMatrix` and higher-order `ComponentArray`s? HOT 12
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 componentarrays.jl.