function [B_dataset,B_test,map] = DPSH_cifar_10_demo(codelens)
    %% prepare the dataset
    data_prepare_cifar_10;
    %% load the pre-trained CNN
    net = load('data/imagenet-vgg-f.mat') ;
    %% load the Dataset
    load('data/CIFAR-10/cifar-10.mat') ;
    %% initialization
    maxIter = 150;
    eta = 10;
    lr = logspace(-2,-6,maxIter) ; %generate #maxIter of points between 10^(-2) ~ 10^(-6) 
    net = net_structure (net, codelens);
    U = zeros(size(train_data,4),codelens);
    B = zeros(size(train_data,4),codelens);
    %% training
    for iter = 1: maxIter
        [net,U,B] = train(train_data,train_L,U,B,net,iter,lr(iter),eta) ;
    end
    %% testing
    [map,B_dataset,B_test] = test_cifar_10(net, dataset_L, test_L,data_set, test_data );
    save(['DPSH_CIFAR_10_' num2str(codelens) 'bits.mat'],'B_dataset','B_test','map');
end