# Deep learning experiments in OCaml

DevFeed: [Deep learning experiments in OCaml](<https://devfeed.tech/articles/deep-learning-experiments-in-ocaml-20162.md>)

Original publisher: [Read original article](<https://blog.janestreet.com/deep-learning-experiments-in-ocaml/>)

Author: Laurent Mazare

Published: 2018-09-20T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jane Street](<https://devfeed.tech/sources/jane-street.md>)

Topics: [OCaml](<https://devfeed.tech/topics/ocaml.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Tensorflow](<https://devfeed.tech/topics/tensorflow.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [GPU](<https://devfeed.tech/topics/gpu.md>)

Tags: [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [neural-networks](<https://devfeed.tech/tags/neural-networks.md>), [ocaml](<https://devfeed.tech/tags/ocaml.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [recurrent](<https://devfeed.tech/tags/recurrent.md>), [rnn](<https://devfeed.tech/tags/rnn.md>), [tensorflow](<https://devfeed.tech/tags/tensorflow.md>)

## AI overview

This article describes reproducing classical deep learning experiments in OCaml instead of Python. It explains using TensorFlow bindings to train functional OCaml models on a GPU, including Neural Style Transfer and character-level language modeling, and discusses type-safe representations of TensorFlow computation graphs.

## Source excerpt

Last year we held a machine learning seminar in our London office, which was an opportunity to reproduce some classical deep learning results with a nice twist: we used OCaml as a programming language rather than Python. This allowed us to train models defined in a functional way in OCaml on a GPU using TensorFlow.