clone of cuda-convnet2