File Exchange

image thumbnail


version (3.53 MB) by Chengxi Ye
Efficient, transparent deep learning in hundreds of lines of code.


Updated 21 Oct 2017

GitHub view license on GitHub

LightNet is a lightweight, versatile and purely Matlab-based deep learning framework. The aim of the design is to provide an easy-to-understand, easy-to-use and efficient computational platform for deep learning research. The implemented framework supports major deep learning architectures such as the Multilayer Perceptron Networks (MLP), Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN). LightNet supports both CPU and GPU for computation and the switch between them is straightforward. Different applications in computer vision, natural language processing and robotics are demonstrated as experiments.
This work was published as:
Chengxi Ye, Chen Zhao, Yezhou Yang, Cornelia Fermüller, and Yiannis Aloimonos. 2016. LightNet: A Versatile, Standalone Matlab-based Environment for Deep Learning. In Proceedings of the 2016 ACM on Multimedia Conference (MM '16). Amsterdam, The Netherlands, 1156-1159. (

Cite As

Chengxi Ye (2020). LightNet (, GitHub. Retrieved .

Comments and Ratings (12)

how I get this code?please


good job man.
hope to see more excellent work from you.

YL Zhang

A big help! Thx!

hao li

great works


What should be the structure of time series data while using your RNN module? Should it be a 3d array with dim 1: samples, dim 2: time and dim 3: variables?

Chengxi Ye

The latest update enables training with Newton's method.

Chengxi Ye

NN toolbox is not required but highly recommended.


Is the Neural Network Toolbox necessary?


After debugging for a few minutes it seems to work fine. I had to use reshape to get sizes of variables to match multiple times and erase all occurrences of the function gather() ( I don't have the parallel computing toolbox on this computer).
Great work and thanks !




Reference added.

fixes for Matlab R2017a

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux