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)
- move the codebase to 4 spaces indentation HOT 6
- Why Flux is Significantly Slower than Pytorch? HOT 2
- Implement data movement across GPU devices. HOT 1
- Flux.jl Documentation (Training API Reference)
- Create how-to guide for custom layers HOT 2
- Huber Loss Fails with Metal GPU
- `train!` using Metal and stateful optimizers fails HOT 5
- Warning: `sort(d::Dict; args...)` is deprecated, use `sort!(OrderedDict(d); args...)` instead. HOT 2
- Does `withgradient` have lower precicision than simply calling the function? HOT 3
- Warning: sort(d::Dict; args...) is deprecated, use sort!(OrderedDict(d); args...) instead. HOT 1
- `show` is confused by shared parameters
- No cudnn implementation of Conv((1,) N=>M) HOT 12
- Flux docs missing withgradient() call for multi-objective loss functions HOT 6
- can't use masks in multi-head-attention layer HOT 6
- Adapt saving & loading example to CuArrays HOT 2
- Segmentation fault when doing a forward pass with a model saved with BSON HOT 2
- Flux new explicit API does not work but old implicit API works for a simple RNN HOT 4
- Intel Arc GPU support. HOT 1
- `using Flux, cuDNN` freezes, but `using Flux, CUDA, cuDNN` works HOT 1
- Convolutional network slower than tensorflow on CPU 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.