News for hackers. Stuff that matters.
Re:Show HN: Juggernaut – Experimental Neural Network in Rust by amelius on Wednesday July 26, 2017 @08:56AM (#14855767)
I'm a bit confused. How useful is this if:

- Rust cannot compile to the GPU

- Neural network programs are usually not large and therefore do not need the type safety that Rust offers

- All cool neural network research is done on Keras/Tensorflow, so developing on that platform gives access to new algorithms automatically

- Scripting in Python is virtually at least as fast as anything else because you can use Tensorflow which uses the GPU

Re:Show HN: Juggernaut – Experimental Neural Network in Rust by hobofan on Wednesday July 26, 2017 @10:39AM (#14856533)
> All cool neural network research is done on Keras/Tensorflow, so developing on that platform gives access to new algorithms automatically

I disagree with that assessment. The implementations that come with research are rarely of a quality that they can just be picked up and used. Yes, the community is bigger with Python frameworks, which gives you quicker access to the new stuff, but the effort is about the same as writing a new implementation in another language.

Re:Show HN: Juggernaut – Experimental Neural Network in Rust by danieldk on Wednesday July 26, 2017 @02:19PM (#14858721)
which gives you quicker access to the new stuff, but the effort is about the same as writing a new implementation in another language

Not really. You can just serialize a Tensorflow graph, freeze the variables as constants, and then load and run the graph using Tensorflow's small and convenient C API. There are bindings to the C API for multiple languages (e.g. Rust and Go).

This is how I use neural networks in my Rust (and formerly Go) programs: I just build and train the graph in Python and then use it in Rust.

Newer versions of Tensorflow also have the XLA compiler, which compiles a graph to executable code that you can link directly into an application. I haven't tried this approach yet, since the C API serves me well, but it looks promising.

Re:Show HN: Juggernaut – Experimental Neural Network in Rust by liuliu on Wednesday July 26, 2017 @01:33PM (#14858265)
It doesn't matter. Most of the time, especially with Tensorflow, you will have a static computation graph somewhere. Nothing (well, implementation-defined) prevent you compile that into CoreML / Caffe / Caffe2 or just Tensorflow lean version to get deployed. PyTorch is a bit different because it supports dynamic graph.
Re:Show HN: Juggernaut – Experimental Neural Network in Rust by yorwba on Wednesday July 26, 2017 @09:11AM (#14855897)
> - Neural network programs are usually not large and therefore do not need the type safety that Rust offers

TensorFlow Fold [1] uses static type checking at model compilation time, presumably because it is meant to consume structured data, and needs to know what the opaque tensors it passes around are supposed to represent.

I don't fully comprehend that type system, and debugging type errors was annoying (huge stacktrace full of passing type info around), but after I managed to imitate it well enough to hack up my own blocks, I didn't investigate further. A language-level type system like Rust's would probably have made things easier for me.

EDIT: I just remembered that there's also Leaf [2], which claims to be among the faster neural network libraries (although their comparison is a bit outdated). Evidently there are people seriously pursuing machine learning in Rust (still uses CUDA for GPU acceleration, though).

[1] https://github.com/tensorflow/fold

[2] https://github.com/autumnai/leaf

Re:Show HN: Juggernaut – Experimental Neural Network in Rust by hobofan on Wednesday July 26, 2017 @10:34AM (#14856477)
Author of Leaf here. Yes, Leaf has been dead for more then a year. There recently has been an effort by some community members to pick up development of Leaf under a new name: https://github.com/spearow
Re:Show HN: Juggernaut – Experimental Neural Network in Rust by pjmlp on Wednesday July 26, 2017 @10:37AM (#14856512)
> Rust cannot compile to the GPU

Rust might not be able to compile to the GPU today, but any language can target the GPU, it is only a matter of tooling support.

Re:Show HN: Juggernaut – Experimental Neural Network in Rust by kersny on Wednesday July 26, 2017 @11:51AM (#14857256)
#1 is not strictly true, although it's not necessarily useful yet: https://github.com/japaric/nvptx#nvptx
Re:Show HN: Juggernaut – Experimental Neural Network in Rust by mi_lk on Wednesday July 26, 2017 @09:01AM (#14855807)
> All cool neural network research is done on Keras/Tensorflow

Add in PyTorch if you are really talking about nn research.