Skip to content

mossbanay/ocaml_autoencoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCaml autoencoder

A simple linear autoencoder using ocaml-torch and bimage. I used the MNIST fashion dataset but regular MNIST will work just fine too. As few as 10 dimensions in the bottleneck still works surprisingly well from a subjective evaluation.

How to run

First you need to extract the MNIST files into a folder called =data= in the repository root. Then you can build the project with

dune build

and start training with

dune exec ./train.exe

which should generate a =weights.ot= file that saves the learnt weights. To preview a comparison of a sample before and after passing through the AE, run

dune exec ./compare.exe

and you should see two new files called =image.jpg= and =processed_image.jpg=.

Examples

The following (tiny!) examples were generated when training with the defaults.

Before example 1 After example 1

Before example 2 After example 2

Before example 3 After example 3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages