Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

CorrNet

This is an implementation of Correlational Neural Network (CorrNet) described in the following paper : Sarath Chandar, Mitesh M Khapra, Hugo Larochelle, Balaraman Ravindran. Correlational Neural Networks.

CorrNet

For detailed description please refer to my blog post COMMON REPRESENTATION LEARNING USING DEEP CORRNET.

Dependencies

This implementation uses Python 2.7, Keras (2.0 or above) with Theano backend, and Scikit Learn.

Dataset

Please extract the contents from training_and_testing_data_corrnet.rar file and keep it in the same folder as the DeepLearn_corrnet.py script.

Usage:

Training and testing the model on MNIST dataset.

>>> left_view, right_view = prepare_data()
>>> model,branchModel = buildModel(loss_type)
>>> trainModel(model,left_view,right_view,loss_type=2,nb_epoch=40,batch_size=100)
>>> testModel(branchModel)
 
view1 to view2 transfer accuracy
0.8879
view2 to view1 transfer accuracy
0.8964
 
test sum-correlation
49.1316743225

Reconstruction of one view given the other

>>> reconstruct_from_left(model,left_view[6:7])

Left2right reconstruction

>>> reconstruct_from_right(model,right_view[6:7])

Right2left reconstruction