Comments (5)
RE this and #23: if this is easy to in either TensorFlow or MXNet then it should be pretty easy to add to Flux. Could you perhaps give an example of how that looks? If it's as simple as a function call it's very easy to add and I can help you with that.
from flux.jl.
Well basically what I am looking for are these two packages
https://github.com/simonster/Lasso.jl
https://github.com/nignatiadis/SmoothingSplines.jl
but accelerated with something like TF or MXN running on GPUs.
As far as I know there are no calculations going on in there other than basic linear algebra, so as long as that is possible in the libs then I guess it should be possible to do here. Don't know how much work it would be to implement though..
But I did find this reference:
https://github.com/nfmcclure/tensorflow_cookbook,
where sections 6-8 in chapter 3 are the gist of the first package
from flux.jl.
By the way, I'd love to help out in doing this, but I'm not quite sure how to get started. Could you perhaps give me some pointers as to how this could get integrated into Flux?
from flux.jl.
Sure, I should really write some docs on this stuff but here's a basics of it. So at the core of it you just want to write a function like
@net f(x, y) = x .* y
fm = mxnet(f)
fm(rand(5), rand(5))
With the inputs replaced with real inputs and the .*
replaced by whatever linalg implements the algorithm you want.
All Flux needs to know is how to turn the linalg into a TensorFlow/MXNet graph. This is listed here for MXNet; you can see that we're just saying, given the .*
function and two existing graphs (mx.Symbol
s or TensorFlow.Tensor
s), how do we use MXNet's API to add that op to the graph. So it's pretty simple.
So all you need to do is (1) write the algorithm you want in pure Julia (but using linear algebra that TensorFlow supports; it doesn't matter if it's slow), and (2) add @net
, see where the conversion to TensorFlow fails, and add support for operations as required.
Let me know if you get stuck anywhere and I can try to get you going with this.
from flux.jl.
Closing this for now as it's from pre-Julia-backend times. If you need custom functions like this it'd probably be sensible to build it on CuArrays
.
from flux.jl.
Related Issues (20)
- The dedicated tutorial on DataLoader is missing HOT 2
- Incorrect link on docs HOT 4
- Hard error using dice loss HOT 2
- Compilation time of Flux models HOT 1
- Flux.setup buggy and broken in latest v.0.13.17 HOT 3
- example for using apple GPU with flux HOT 4
- 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
- tests are failing due to ComponentArrays HOT 2
- 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 9
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.