There is https://github.com/rejuvyesh/PyCallChainRules.jl which makes this possible. But using some of the native Julia ML libraries that others have mentioned is preferable.
44 karma · joined October 14, 2014
There is https://github.com/rejuvyesh/PyCallChainRules.jl which makes this possible. But using some of the native Julia ML libraries that others have mentioned is preferable.
Lux is similar to Flax (Jax) where the parameters are kept in a separate variable from the model definition, and they are passed in on the forward pass. Notably, this design choice allows Lux to accept parameters built with ComponentArrays.jl which can be especially helpful when working with libraries that expect flat vectors of parameters.
Flux lies somewhere between Jax and PyTorch. Like PyTorch, the parameters are stored as part of the model. Unlike traditional PyTorch, Flux has “functional” conventions, e.g. `g = gradient(loss, model)` vs. `loss.backward()`. Similar to Flax, the model is a tree of parameters.
Also this is what railway lines looked liked in the US when we cared to build out our train infrastructure: https://i.pinimg.com/originals/3c/57/ee/3c57eeffb7e1a3c78691.... Just because the US is big doesn’t mean we can’t build tracks.
> Since FastAI.jl uses Flux, and not PyTorch, functionality has to be reimplemented.
We are looking to offer a high level API for ML in Julia similar to fastai for PyTorch. The goal is to enrich the Flux ecosystem, so just calling into Python fastai wouldn’t be appropriate. FastAI.jl is built on top of several lower level packages that can be used separately from FastAI.jl. These packages help build out the ecosystem not just for FastAI.jl, but any ML framework or workflow in Julia.
> What does this mean for the development of fastai?
FastAI.jl is “unofficial” in that Jeremy and the fastai team did not develop it. But Jeremy knows about the project, and we have kept in touch with the fastai team for feedback. FastAI.jl doesn’t affect the development of Python fastai in any way.
> FastAI.jl has vision support but no text support yet.
> What is the timeline for FastAI.jl to achieve parity?
We’re working to add more out-of-the-box support for other learning tasks. Currently, we have tabular support on the way, but the timeline for text is not decided.
Note that the framework itself could already support a text learning method, but you’d have to implement the high level interface functions for it yourself. We just don’t have built-in defaults like vision. You can check out https://fluxml.ai/FastAI.jl/dev/docs/learning_methods.md.htm... for a bit more on what I mean.
> When should I choose FastAI.jl vs fastai?
It depends on what you need. PyTorch and fastai are more mature, but Julia and Flux tend to be more flexible to non-standard problems in my experience. If you’re interested, then give Julia/Flux/FastAI.jl a try. If we’re missing a mission critical feature for you, then please let us know so we can prioritize it.
I use it for my research by default. You can pan, zoom, etc. The subplot/layout system is frankly a lot better than Matlab (and I enjoyed Matlab for plotting!). The best part is that I can insert sliders and drop downs into my plot easily, which means I don’t need to waste time figuring out the best static, 2D plot for my experiment. I just dump all the data into some custom logging struct and use sliders to index into the correct 2D plot (e.g. a heat map changing over time, I just save all the matrices and use the slider to get the heat map at time t).
Now the accelerator in the M1 is only 11 TFLOPs. So it’s definitely not trying to compete as an accelerator for training.
A downside to using multiple cells is vertical spacing/visual noise. This is something that the package authors are currently thinking about addressing.
As with most things in Julia, the code developers don’t just want to hack changes that work, but make changes that are flexible, extensible, and can solve many problems at once. So, Flux isn’t ready for prime time yet, but it is definitely worth keeping your eye on it.
As for features, I think this is because people coming from TF or PyTorch are used one monolithic package that does everything. That’s intentionally not how Flux or the Julia ecosystem is designed. I’ll admit that there are a lot of preprocessing utility functions that could be better in the larger Julia ML community. But for the most part, the preprocessing required for ML research is available. This is mostly the fault of the community of not having a single document explaining to new users how all the packages work together.
Where the difference between Flux and other ML frameworks is apparent is when you try to do anything other than a vanilla deep learning model. Flux is extensible in a way that the other frameworks are just not. A simple example is with the same lab mate and I trying to recreate a baseline from a paper that involved drawing from a distribution at inference time based on a layer’s output then applying a function to that layer based on the samples drawn. I literally implemented the pseudo code from the paper because in Flux everything is just a function, and chains of models can be looped in a for loop like an array. Dumb pseudo code like statements where you just write for loops are just as fast in Julia. And it was! Meanwhile my friends code came to a grinding halt. He had to resort to numerical approximations for drawing from the distribution because he was forced to only use samplers that “worked well” in PyTorch. This is the disadvantage of a monolithic ML library. I didn’t use “Flux distributions,” I just used the standard distributions package in Julia.
This disadvantage to TF and PyTorch will become even more apparent when you do model-based RL. Flux was designed to be simple and extensible from the start. TF and PyTorch were not.
As opposed to a neuroscientist understanding a processor, Jim is a computer architect using his techniques to understand the brain.
Companies have been autogenerating Verilog from high level languages for decades.
As for Monte Carlo with respect to ML, are you referring to the “random walk” aspect when you say “use randomness.” This refers to the fact that the method samples one possible sequence of events and uses that sequence to update its model. As opposed to dynamic programming methods where the value of all possible sequences is estimated and used to update the model. Not sure that the randomness from quantum is useful here. Where it could be useful is to encourage exploration of the state space. So, normally Monte Carlo methods have various tricks to make sure every sequence is sampled infinitely many times. These tricks could be implemented by the error in quantum computing, but I don’t know enough about the field to really be sure of that. And of course it would help in that you could compute the results of many sequences at once which is critical bottleneck in dynamic programming.
Read the banner at the top of the page again. It doesn’t ask users to stop customizing, and it doesn’t say there shouldn’t be distros with custom theming. It just asks distros to stop shipping broken apps as a result of theming, and it asserts that if that’s the route you want to go, then you are on your own.
To have hardware that allowed any neuron model would boil down to having an array of MAC units, or even more generally, a DSP. At that point you’ve lost sight of your original goal with a neuromorphic chip — to build an energy-efficient, scalable neural emulator.
With respect to the academic research aspect — graduate labs can get their hands on neuromorphic hardware. GPUs weren’t made ubiquitous to process scientific algorithms. It was the researchers who had the ingenuity to use GPUs for general purpose compute. Access to a powerful GPU then was as straightforward as access to a neuromorphic chip is now. The issue is when you try to scale the problem you are solving. In this vein, a GPU cluster of that size is not currently available to academics. That’s why you see a bias towards deep learning research in industry. In other words, it doesn’t make sense to compare a server of neuromorphic chips (which is what is required to simulate realistic neural behavior) to a single GPU. Compare it to servers of GPUs like Google’s or FB’s. You’ll see that academics have poor resources in both cases and the research keeps moving on.
> gasoline cars will be worthless scrap heaps over night
This is true if the market is allowed to operate freely — “free” should not be confused with “unregulated.” Unfortunately, when it comes to energy in the US, the market is cleverly controlled to push the inevitable rise of clean energy back several decades. It has been this way for a while now. The regulation here might seem heavy handed, but that’s the kind of push that clean energy needs to win the uphill battle it’s fighting. If we hadn’t rigged the market for so long, then the natural progress of technology would have addressed climate change in time. But now we’ve waited to long, and we need hard hitting policies to peddle back the pace of the damage.
> It feels like a fight and will disrupt many lives, and it doesn’t need to be that way.
This is where you won me back over. The truth is that it is a fight. But it is important to note for those of us who want to address climate change that how we fight is important. Unlike some other markets, we haven’t really had the opportunity as a country to see what a regulated, climate-focused market looks like. So, if we push some policies that take away jobs from people who have been working in coal mines their entire lives, then that’s going to be the headline. Everyone for so long has been saying that clean energy is too radical, and it will kill the economy. We have the opportunity to implement a comprehensive plan for a gradual transition. Bring clean technology to the forefront while helping those that will suffer to slowly transition into retirement. If we can address climate change, create a new sector of jobs, and let an old market die gracefully, then the naysayers will have nothing of substance to complain about.