Author Archives: A Technical Blog -- julia

Plain Functions that Just Work with TensorFlow.jl

By: A Technical Blog -- julia

Re-posted from: http://white.ucc.asn.au/2017/05/04/Plain-Functions-that-Just-Work-with-TensorFlow.jl.html

Anyone who has been stalking me may know that I have been making a fairly significant number of PR’s against TensorFlow.jl.
One thing I am particularly keen on is making the interface really Julian. Taking advantage of the ability to overload julia’s great syntax for matrix indexing and operations.
I will make another post going into those enhancements sometime in the future; and how great julia’s ability to overload things is. Probably after #209 is merged.
This post is not directly about those enhancements, but rather about a emergant feature I noticed today.
I wrote some code to run in base julia, but just by changing the types to Tensors it now runs inside TensorFlow, and on my GPU (potentially).
Continue reading

JuliaML and TensorFlow Tuitorial

By: A Technical Blog -- julia

Re-posted from: http://white.ucc.asn.au/2017/01/24/JuliaML-and-TensorFlow-Tuitorial.html

This is a demonstration of using JuliaML and TensorFlow to train an LSTM network.
It is based on Aymeric Damien’s LSTM tutorial in Python.
All the explinations are my own, but the code is generally similar in intent.
There are also some differences in terms of network-shape.

The task is to use LSTM to classify MNIST digits.
That is image recognition.
The normal way to solve such problems is a ConvNet.
This is not a sensible use of LSTM, after all it is not a time series task.
The task is made into a time series task, by the images arriving one row at at a time;
and the network is asked to output which class at the end after seeing the 28th row.
So the LSTM network must remember the last 27 prior rows.
This is a toy problem to demonstrate that it can.

To do this we are going to use a bunch of packages from the JuliaML Org, as well as a few others.
A lot of the packages in JuliaML are evolving fast, so somethings here may be wrong.
You can install the packages used in this demo by running:
Pkg.add.(["TensorFlow", "Distributions", "ProgressMeter", "MLLabelUtils", "MLDataUtils"]),
and Pkg.clone("https://github.com/JuliaML/MLDatasets.jl.git").
MLDatasets.jl is not yet registers so you need to clone that one.
Also right now (24/01/2017), we are using the dev branch of MLDataUtils.jl,
so you will need to do the git checkout stuff to make that work,
but hopefully very soon that will be merged into master, so just the normal Pkg.add will surfice.
You also need to install TensorFlow, as it is not automatically installed by the TensorFlow.jl package.
We will go through each package we use in turn. Continue reading

JuliaPro beta 0.5.02 first impressions

By: A Technical Blog -- julia

Re-posted from: http://white.ucc.asn.au/2017/01/19/JuliaPro-first-impressions.html

JuliaPro is JuliaComputing’s prepackaged bundle of julia, with Juno/Atom IDE, and a bunch of packages. The short of it is: there is no reason not to install julia this way on a Mac/Windows desktop – it is more convenient and faster to setup, but it is nothing revolutionary.
Continue reading