r/Clojure • u/dragandj • Sep 05 '20
Deep Diamond: Deep Learning in Clojure is Fast, and Simpler than Keras
https://dragan.rocks/articles/20/Deep-Diamond-Deep-Learning-in-Clojure-is-Fast-and-Simpler-than-Keras3
2
Sep 05 '20
I really don't know why I haven't delved into machine learning, it's most certainly going to be in high demand and has many practical usages but I never get the big picture. Any good simple non-code focused intros to the fundamentals of machine learning?
4
u/vvvvalvalval Sep 05 '20
I love MacKay's ITILA, it's an underrated resource about the conceptual big picture of ML. It won't make you a deep learning practioner though.
Personally, I don't find ML that exciting conceptually. I haven't found anything better than programming to walk me through marvellous and accessible worlds of abstraction. Using ML for non-research projects these days is much more plumbing and much less inventing than software programming IMHO.
3
u/TheLastSock Sep 05 '20 edited Sep 05 '20
Was the best overall summary I encountered. The challenge is that neural networks nets are:
higher order functions
Recursive
Probablistic
Those are concepts that are hard to have an intuition about.
In programming speak, The key is that you need to design a function which will take the guess/output and modify the first class function you passed in such that on the next loop of recursion you move closer to the answer. This means you already know the answer for these inputs.
When that first class function does it's job of getting the answers, you output that function and use it on inputs for which you don't yet have the answer.
1
u/vvvvalvalval Sep 05 '20
What do you mean by HOF? Do you view connecting layers as invoking a network with a function-typed argument?
2
u/TheLastSock Sep 05 '20
If I view the entire machine learning process (like in the case of image processing) as a function. It's a function which takes a lot of functions in order to do it's job adquety in that context. It also could be viewed as a hof in that when your done traing you return a function.
1
u/jt-wololo Sep 06 '20
We can imagine a generic neutral network function that takes a plurality of layers, which are themselves a special type of function. All layers must be functions that accept an array and return an array. This would make the neural network function higher order because it takes functions as arguments.
In practice, we would likely use functions to generate those layer functions. For example, we may want an LSTM function that generates a layer function that behaves like an LSTM. The LSTM function would take some relevant parameters, e.g., forget rate, activation function, and return a layer function. You'll note that this function itself is higher order: taking an activation function as an argument.
This hasn't even touched on training and tuning, which would be additional functions that take the neural network and some training data as input.
8
u/DerpyCrabs Sep 05 '20
It looks so easy that now I want to become clojure data scientist. Great job!