Some renaming. Some redoing.

parent 17dc82dd
all:
$(MAKE) -C src
# $(MAKE) -C doc
all:
$(MAKE) -C code
$(MAKE) doc
clean:
$(MAKE) -C src clean
# make -C doc clean
$(MAKE) -C code clean
doc: bmf.dox code/*.cpp code/*.h
-rm -rf doc/html
-doxygen bmf.dox
......@@ -22,8 +22,8 @@ TEST=$(patsubst %.cpp,%,$(TESTSRC))
TOOLSRC=$(wildcard *_tool.cpp)
TOOL=$(patsubst %.cpp,%,$(TOOLSRC))
# experiments
EXPSRC=$(wildcard *_exp.cpp)
EXP=$(patsubst %.cpp,%,$(EXPSRC))
#EXPSRC=$(wildcard *_exp.cpp)
#EXP=$(patsubst %.cpp,%,$(EXPSRC))
ifdef DEBUG
CFLAGS=-DDEBUG -O -Wall -g -fopenmp -march=native -mtune=native
......@@ -33,12 +33,10 @@ endif
CFLAGS+=-I../contrib/include
LDFLAGS=-L../contrib/lib -lgsl -lgslcblas -lm
all: $(OBJ) $(TOOL) $(TEST) $(EXP)
all: $(OBJ) $(TOOL) $(TEST)
tests: $(TEST)
exps: $(EXP)
tools: $(TOOL)
%.o: %.cpp $(HDR) Makefile
......
/**
* \file bmf_types.h
* \file base_types.h
* \brief basic (scalar) types used in the BMF package.
*/
#ifndef BASE_TYPES_H
......
......@@ -4,5 +4,9 @@
"path": "."
}
],
"settings": {}
"settings": {
"files.associations": {
"iostream": "cpp"
}
}
}
\ No newline at end of file
......@@ -117,7 +117,7 @@ idx_t learn_model_alter1(binary_matrix& X,
binary_matrix Ht(M,N);
H.transpose_to(Ht);
//
// RUN BSVD
// RUN BMF
//
idx_t changed = 1;
idx_t iter = 0;
......
#ifndef BSVD_H
#define BSVD_H
/**
* \file bmf.h
* \brief Dictionary learning methods for Binary Matrix Factorization
*/
#ifndef BMF_H
#define BMF_H
idx_t learn_model_traditional(binary_matrix& X,
const binary_matrix& H,
......
......@@ -8,6 +8,7 @@
#include "bmf_rng.h"
#include "bmf_util.h"
#include "bmf_config.h"
#include "binimage.h"
int mi_algo = 0; // -1 is initialization by file
int es_algo = 2; // default now is BMP
......@@ -16,6 +17,7 @@ int lm_algo = 0;
int lmi_algo = 0;
idx_t W = 16;
idx_t stride = 0;
idx_t K = 512;
idx_t maxK = 512;
bool image_mode = false;
......@@ -48,7 +50,8 @@ void show_help(const char* pname) {
list_choices("\t\t",lm_algorithm_names);
std::cout << "\t-L model learning algorithm. Choices are:" << std::endl;
list_choices("\t\t",lm_algorithm_names);
std::cout << "\t-w patch width, for image analysis." << std::endl;
std::cout << "\t-w patch width, for patch-based image analysis." << std::endl;
std::cout << "\t-s patch stride, for patch-based image analysis." << std::endl;
std::cout << "\t-k initial model size/rank" << std::endl;
std::cout << "\t-K max. model size/rank" << std::endl;
std::cout << "\t-r random number generator seed (int)" << std::endl;
......@@ -101,6 +104,9 @@ void parse_args(int argc, char **argv) {
case 'w':
W = (idx_t) atoi(val);
break;
case 's':
stride = (idx_t) atoi(val);
break;
case 'k':
K = (idx_t) atoi(val);
break;
......@@ -150,6 +156,13 @@ int main(int argc, char **argv) {
parse_args(argc,argv);
//
// indirect paramters
//
if (stride == 0) {
stride = W;
}
//
// input data
//
......@@ -209,33 +222,13 @@ int main(int argc, char **argv) {
binary_matrix X,H;
if (image_mode) {
std::cout << "==== DATA TREATED AS IMAGE, VECTORS ARE PATCHES =====\n" << std::endl;
idx_t Ny = (W-1+rows)/W;
idx_t Nx = (W-1+cols)/W;
idx_t Ny = compute_grid_size(rows,W,stride,EXTRACT_FULL);
idx_t Nx = compute_grid_size(cols,W,stride,EXTRACT_FULL);
M = W*W;
std::cout << "Nx=" << Nx << " Ny=" << Ny << std::endl;
N = Nx*Ny;
X.allocate(N,M);
//
// Initialize data
//
idx_t li = 0;
binary_matrix P(W,W),V(1,W*W);
for (idx_t i = 0; i < Ny; i++) {
for (idx_t j = 0; j < Nx; j++,li++) {
I.copy_submatrix_to(i*W,(i+1)*W,j*W,(j+1)*W,P);
P.copy_vectorized_to(V);
X.set_row(li,V);
if (have_mask) {
J.copy_submatrix_to(i*W,(i+1)*W,j*W,(j+1)*W,P);
P.copy_vectorized_to(V);
H.set_row(li,V);
}
}
}
N = li;
P.destroy();
V.destroy();
extract_patches(I,W,stride,EXTRACT_FULL,X);
} else {
std::cout << "==== DATA TREATED AS MATRIX, VECTORS ARE ROWS =====\n" << std::endl;
X = I.get_copy();
......@@ -300,22 +293,14 @@ int main(int argc, char **argv) {
write_pbm(A,"__final_coeffs__.pbm");
if (image_mode) {
render_mosaic(D,"__final_dict_mosaic__.pbm");
idx_t Ny = (W-1+rows)/W;
idx_t Nx = (W-1+cols)/W;
idx_t li = 0;
binary_matrix P(W,W),V(1,W*W);
for (idx_t i = 0; i < Ny; i++) {
for (idx_t j = 0; j < Nx; j++,li++) {
// std::cout << "n=" << li << std::endl;
E.copy_row_to(li,V);
P.set_vectorized(V);
I.set_submatrix(i*W,j*W,P);
}
}
P.destroy();
V.destroy();
fimg = fopen("__final_residual__.pbm","w");
if (!fimg) return -2;
integer_matrix accu,count;
accu.allocate(I.get_rows(),I.get_cols());
count.allocate(I.get_rows(),I.get_cols());
stitch_patches(E,I.get_rows(),I.get_cols(),stride,EXTRACT_FULL,I,accu,count);
count.destroy();
accu.destroy();
write_pbm(I,fimg);
fclose(fimg);
} else {
......
/**
* \file bmf_update_coefficients.h
* \file bmf_update_coeffs.h
* \brief Interface to functions whose role is to update the coefficients of a BMF representatio.
*/
#ifndef ENCODE_SAMPLES_H
......
/**
* \file bmf_update_dict.h
* \brief Algorithm for updating the dictionary part (D) of the matrix representation X = D*A + E
*/
#ifndef UPDATE_DICTIONARY_H
#define UPDATE_DICTIONARY_H
......
/**
* Implementación de cuerpos finitos de Galois de tamanho 2^m
* y polinomios sobre ellos.
* \file galois.h
* \brief Algebra over Galois Finite Fields of size 2^m
*/
#ifndef GALOIS_H
#define GALOIS_H
......
/**
* \file intmat.h
* \brief Simple matrix with integer valued elements
*/
#ifndef INTMAT_H
#define INTMAT_H
#include <algorithm>
......
/**
* \file pbm.h
* \brief Handling of Portable Bitmap files (PBM)
*/
#ifndef PBM_H
#define PBM_H
......
/**
* \file pnm.h
* \brief Handling of the various types of PNM image files
*/
#ifndef PNM_H
#define PNM_H
#include <cstdio>
......
#!/bin/bash
mkdir -p results/denoise
src/add_noise_tool data/einstein.pbm results/denoise/einstein_p0.02.pbm 0.02
src/extract_patches_tool results/denoise/einstein_p0.02.pbm 8 1 res/denoise/einstein_p0.02_patches.pbm
src/bmf_denoising_exp -l 4 -c 2 -i 1 -p 0.02 -k 100 ${*} -o results/denoise/einstein_p0.02_patches_den.pbm res/denoise/einstein_p0.02_patches.pbm
src/stitch_patches_tool results/denoise/einstein_p0.02_patches_den.pbm 896 1160 1 res/denoise/einstein_p0.02_den.pbm
code/add_noise_tool data/einstein.pbm results/denoise/einstein_p0.02.pbm 0.02
code/extract_patches_tool results/denoise/einstein_p0.02.pbm 8 1 res/denoise/einstein_p0.02_patches.pbm
code/bmf_denoising_tool -l 4 -c 2 -i 1 -p 0.02 -k 100 ${*} -o results/denoise/einstein_p0.02_patches_den.pbm res/denoise/einstein_p0.02_patches.pbm
code/stitch_patches_tool results/denoise/einstein_p0.02_patches_den.pbm 896 1160 1 res/denoise/einstein_p0.02_den.pbm
#mv *.pbm results/denoise
#!/bin/bash
mkdir -p results/denoise2
src/add_noise_tool data/einstein.pbm results/denoise2/einstein_p0.02.pbm 0.02
src/extract_patches_tool results/denoise2/einstein_p0.02.pbm 16 res/denoise2/einstein_p0.02_patches.pbm
src/bmf_denoising_exp -i 5 -p 0.02 -k 512 ${*} -o results/denoise2/einstein_p0.02_patches_den.pbm res/denoise2/einstein_p0.02_patches.pbm
src/stitch_patches_tool results/denoise2/einstein_p0.02_patches_den.pbm 896 1160 res/denoise2/einstein_p0.02_den.pbm
code/add_noise_tool data/einstein.pbm results/denoise2/einstein_p0.02.pbm 0.02
code/extract_patches_tool results/denoise2/einstein_p0.02.pbm 16 res/denoise2/einstein_p0.02_patches.pbm
code/bmf_denoising_tool -i 5 -p 0.02 -k 512 ${*} -o results/denoise2/einstein_p0.02_patches_den.pbm res/denoise2/einstein_p0.02_patches.pbm
code/stitch_patches_tool results/denoise2/einstein_p0.02_patches_den.pbm 896 1160 res/denoise2/einstein_p0.02_den.pbm
mv *.pbm results/denoise2
#!/bin/bash
make -C src -j 4
make -C code -j 4
mkdir -p results/mnist
time src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 $* data/mnist_data.pbm | tee results/mnist/mnist.log
time code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 $* data/mnist_data.pbm | tee results/mnist/mnist.log
mv *pbm results/mnist
mkdir -p results/usps
time src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 $* data/usps_data.pbm | tee results/usps/usps.log
time code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 $* data/usps_data.pbm | tee results/usps/usps.log
mv *pbm results/usps/
mkdir -p results/einstein
time src/bmf_learn_exp -i 1 -l 4 -k 20 -I 1 $* data/einstein.pbm | tee results/einstein/einstein.log
time code/bmf_learn_tool -i 1 -l 4 -k 20 -I 1 $* data/einstein.pbm | tee results/einstein/einstein.log
mv *pbm results/einstein/
#!/bin/bash
make -C src -j 4
make -C code -j 4
mkdir -p results/mnist/kprox
time src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 -d 1 $* data/mnist_data.pbm | tee results/mnist/kprox/mnist.log
time code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 -d 1 $* data/mnist_data.pbm | tee results/mnist/kprox/mnist.log
mv *pbm results/mnist/kprox
mkdir -p results/usps/kprox
time src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 -d 1 $* data/usps_data.pbm | tee results/usps/kprox/usps.log
time code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 -d 1 $* data/usps_data.pbm | tee results/usps/kprox/usps.log
mv *pbm results/usps/kprox
mkdir -p results/einstein/kprox
time src/bmf_learn_exp -i 1 -l 4 -k 20 -I 1 -d 1 $* data/einstein.pbm | tee results/einstein/kprox/einstein.log
time code/bmf_learn_tool -i 1 -l 4 -k 20 -I 1 -d 1 $* data/einstein.pbm | tee results/einstein/kprox/einstein.log
mv *pbm results/einstein/kprox
#!/bin/bash
make -C src -j 4
make -C code -j 4
mkdir -p results/mnist
src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 $* data/mnist_data.pbm | tee results/mnist/mnist.log
code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 $* data/mnist_data.pbm | tee results/mnist/mnist.log
mv *pbm results/mnist
mkdir -p results/usps
src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 $* data/usps_data.pbm | tee results/usps/usps.log
code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 $* data/usps_data.pbm | tee results/usps/usps.log
mv *pbm results/usps/
mkdir -p results/einstein
src/bmf_learn_exp -i 1 -l 4 -k 20 -I 1 $* data/einstein.pbm | tee results/einstein/einstein.log
code/bmf_learn_tool -i 1 -l 4 -k 20 -I 1 $* data/einstein.pbm | tee results/einstein/einstein.log
mv *pbm results/einstein/
#!/bin/bash
make -C src -j 4
make -C code -j 4
outdir="results/paper/conv-einstein-mob"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -i 6 -l 0 -k 36 -d 0 -I 1 $* data/einstein.pbm -v -v | tee ${outdir}.log
./run bmf_learn_tool -i 6 -l 0 -k 36 -d 0 -I 1 $* data/einstein.pbm -v -v | tee ${outdir}.log
mv *pbm latest/* ${outdir}
outdir="results/paper/conv-einstein-kprox"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -i 6 -l 0 -k 36 -d 1 -I 1 $* data/einstein.pbm -v -v | tee ${outdir}.log
./run bmf_learn_tool -i 6 -l 0 -k 36 -d 1 -I 1 $* data/einstein.pbm -v -v | tee ${outdir}.log
mv *pbm latest/* ${outdir}
outdir="results/paper/conv-einstein-fwd-mob"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -i 6 -l 4 -k 16 -d 0 -I 1 $* data/einstein.pbm -v | tee ${outdir}.log
./run bmf_learn_tool -i 6 -l 4 -k 16 -d 0 -I 1 $* data/einstein.pbm -v | tee ${outdir}.log
mv *pbm latest/* ${outdir}
outdir="results/paper/conv-einstein-fwd-kprox"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -i 6 -l 4 -k 16 -d 1 -I 1 $* data/einstein.pbm -v | tee ${outdir}.log
./run bmf_learn_tool -i 6 -l 4 -k 16 -d 1 -I 1 $* data/einstein.pbm -v | tee ${outdir}.log
mv *pbm latest/* ${outdir}
#!/bin/bash
make -C src -j 4
make -C code -j 4
outdir="results/paper/conv-mnist-mob"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -i 6 -l 0 -k 36 -d 0 -m 1 $* data/mnist_data.pbm -v -v | tee ${outdir}.log
./run bmf_learn_tool -i 6 -l 0 -k 36 -d 0 -m 1 $* data/mnist_data.pbm -v -v | tee ${outdir}.log
mv *pbm latest/* ${outdir}
outdir="results/paper/conv-mnist-kprox"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -i 6 -l 0 -k 36 -d 1 -m 1 $* data/mnist_data.pbm -v -v | tee ${outdir}.log
./run bmf_learn_tool -i 6 -l 0 -k 36 -d 1 -m 1 $* data/mnist_data.pbm -v -v | tee ${outdir}.log
mv *pbm latest/* ${outdir}
outdir="results/paper/conv-mnist-fwd-mob"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -i 6 -l 4 -k 16 -d 0 -m 1 $* data/mnist_data.pbm -v | tee ${outdir}.log
./run bmf_learn_tool -i 6 -l 4 -k 16 -d 0 -m 1 $* data/mnist_data.pbm -v | tee ${outdir}.log
mv *pbm latest/* ${outdir}
outdir="results/paper/conv-mnist-fwd-kprox"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -i 6 -l 4 -k 16 -d 1 -m 1 $* data/mnist_data.pbm -v | tee ${outdir}.log
./run bmf_learn_tool -i 6 -l 4 -k 16 -d 1 -m 1 $* data/mnist_data.pbm -v | tee ${outdir}.log
mv *pbm latest/* ${outdir}
#!/bin/bash
make -C src -j 4
make -C code -j 4
K=49
outdir=mkdir -p results/einstein
outdir="results/paper/init-mob-samp-einstein"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k $K -m 1 -d 0 -i 6 -I 1 data/einstein.pbm -v
./run bmf_learn_tool -l 0 -k $K -m 1 -d 0 -i 6 -I 1 data/einstein.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-mob-rand-einstein"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k $K -m 1 -d 0 -i 5 -I 1 data/einstein.pbm -v
./run bmf_learn_tool -l 0 -k $K -m 1 -d 0 -i 5 -I 1 data/einstein.pbm -v
mv *pbm latest/* ${outdir}
outdir=mkdir -p results/einstein
outdir="results/paper/init-kprox-samp-einstein"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k $K -m 1 -d 1 -i 6 -I 1 data/einstein.pbm -v
./run bmf_learn_tool -l 0 -k $K -m 1 -d 1 -i 6 -I 1 data/einstein.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-kprox-rand-einstein"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k $K -m 1 -d 1 -i 5 -I 1 data/einstein.pbm -v
./run bmf_learn_tool -l 0 -k $K -m 1 -d 1 -i 5 -I 1 data/einstein.pbm -v
mv *pbm latest/* ${outdir}
#!/bin/bash
make -C src -j 4
make -C code -j 4
K=49
outdir=mkdir -p results/mnist
outdir="results/paper/init-mob-samp-mnist"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k $K -m 1 -d 0 -i 6 data/mnist_data.pbm -v
./run bmf_learn_tool -l 0 -k $K -m 1 -d 0 -i 6 data/mnist_data.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-mob-rand-mnist"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k $K -m 1 -d 0 -i 5 data/mnist_data.pbm -v
./run bmf_learn_tool -l 0 -k $K -m 1 -d 0 -i 5 data/mnist_data.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-kprox-samp-mnist"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k $K -m 1 -d 1 -i 6 data/mnist_data.pbm -v
./run bmf_learn_tool -l 0 -k $K -m 1 -d 1 -i 6 data/mnist_data.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-kprox-rand-mnist"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k $K -m 1 -d 1 -i 5 data/mnist_data.pbm -v
./run bmf_learn_tool -l 0 -k $K -m 1 -d 1 -i 5 data/mnist_data.pbm -v
mv *pbm latest/* ${outdir}
#!/bin/bash
make -C src -j 4
make -C code -j 4
outdir=mkdir -p results/usps
outdir="results/paper/init-mob-samp-usps"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 0 -i 6 data/usps_data.pbm -v
./run bmf_learn_tool -l 0 -k 36 -m 1 -d 0 -i 6 data/usps_data.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-mob-rand-usps"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 0 -i 5 data/usps_data.pbm -v
./run bmf_learn_tool -l 0 -k 36 -m 1 -d 0 -i 5 data/usps_data.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-kprox-samp-usps"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 1 -i 6 data/usps_data.pbm -v
./run bmf_learn_tool -l 0 -k 36 -m 1 -d 1 -i 6 data/usps_data.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-kprox-rand-usps"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 1 -i 5 data/usps_data.pbm -v
./run bmf_learn_tool -l 0 -k 36 -m 1 -d 1 -i 5 data/usps_data.pbm -v
mv *pbm latest/* ${outdir}
#!/bin/bash
git pull
make -C src -j 4
make -C code -j 4
outdir="results/einstein-learn-kprox"
mkdir -p ${outdir}
time src/bmf_learn_exp -i 1 -l 4 -k 20 -I 1 -d 1 $* data/einstein.pbm | tee ${outdir}.log
time code/bmf_learn_tool -i 1 -l 4 -k 20 -I 1 -d 1 $* data/einstein.pbm | tee ${outdir}.log
mv *pbm ${outdir}
#!/bin/bash
git pull
make -C src -j 4
make -C code -j 4
outdir="results/einstein-learn-mob"
mkdir -p ${outdir}
time src/bmf_learn_exp -i 1 -l 4 -k 20 -I 1 $* data/einstein.pbm | tee ${outdir}.log
time code/bmf_learn_tool -i 1 -l 4 -k 20 -I 1 $* data/einstein.pbm | tee ${outdir}.log
mv *pbm ${outdir}
#!/bin/bash
git pull
make -C src -j 4
make -C code -j 4
mkdir -p results/hgdp/kprox
#time src/bmf_learn_exp -i 1 -l 4 -k 3 -m 1 -d 1 $* data/dist.pbm data/mask.pbm | tee results/hgdp/kprox/hgdp.log
time src/bmf_learn_exp -i 1 -l 4 -k 3 -m 1 -d 1 $* data/dist.pbm | tee results/hgdp/kprox/hgdp.log
#time code/bmf_learn_tool -i 1 -l 4 -k 3 -m 1 -d 1 $* data/dist.pbm data/mask.pbm | tee results/hgdp/kprox/hgdp.log
time code/bmf_learn_tool -i 1 -l 4 -k 3 -m 1 -d 1 $* data/dist.pbm | tee results/hgdp/kprox/hgdp.log
mv *pbm results/hgdp/kprox
#!/bin/bash
git pull
make -C src -j 4
make -C code -j 4
mkdir -p results/hgdp/mob
#time src/bmf_learn_exp -i 1 -l 4 -k 3 -m 1 -d 1 $* data/dist.pbm data/mask.pbm | tee results/hgdp/mob/hgdp.log
time src/bmf_learn_exp -i 2 -l 4 -k 64 -m 0 -d 0 $* -v data/dist.pbm | tee results/hgdp/mob/hgdp.log
#time code/bmf_learn_tool -i 1 -l 4 -k 3 -m 1 -d 1 $* data/dist.pbm data/mask.pbm | tee results/hgdp/mob/hgdp.log
time code/bmf_learn_tool -i 2 -l 4 -k 64 -m 0 -d 0 $* -v data/dist.pbm | tee results/hgdp/mob/hgdp.log
mv *pbm results/hgdp/mob
#!/bin/bash
make -C src -j 4
make -C code -j 4
outdir="results/mnist-learn-kprox"
mkdir -p ${outdir}
time src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 -d 1 $* data/mnist_data.pbm | tee ${outdir}.log
time code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 -d 1 $* data/mnist_data.pbm | tee ${outdir}.log
mv *pbm ${outdir}
#!/bin/bash
make -C src -j 4
make -C code -j 4
outdir="results/mnist-learn-mob"
mkdir -p ${outdir}
time src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 $* data/mnist_data.pbm | tee ${ouitdir}.log
time code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 $* data/mnist_data.pbm | tee ${ouitdir}.log
mv *pbm ${outdir}
#!/bin/bash
git pull
make -j 4 -C src
make -j 4 -C code
mkdir -p results/usps/kprox
time src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 -d 1 $* data/usps_data.pbm | tee results/usps/kprox/usps.log
time code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 -d 1 $* data/usps_data.pbm | tee results/usps/kprox/usps.log
mv *pbm results/usps/kprox
#!/bin/bash
git pull
make -C src -j 4
make -C code -j 4
mkdir -p results/usps
time src/bmf_learn_exp -i 1 -l 4 -k 10 -m 1 $* data/usps_data.pbm | tee results/usps/usps.log
time code/bmf_learn_tool -i 1 -l 4 -k 10 -m 1 $* data/usps_data.pbm | tee results/usps/usps.log
mv *pbm results/usps/
#!/bin/bash
make -C src -j 4
make -C code -j 4
outdir="results/paper/models/mnist"
./run bmf_learn_exp -i 1 -l 4 -k 100 -m 1 $* data/mnist_data.pbm -v
./run bmf_learn_tool -i 1 -l 4 -k 100 -m 1 $* data/mnist_data.pbm -v
mkdir -p ${outdir}
rm ${outdir}/*
mv *pbm latest/* ${outdir}
outdir="results/paper/models/usps"
./run bmf_learn_exp -i 1 -l 4 -k 100 -m 1 $* data/usps_data.pbm -v
./run bmf_learn_tool -i 1 -l 4 -k 100 -m 1 $* data/usps_data.pbm -v
mkdir -p ${outdir}
rm ${outdir}/*
mv *pbm latest/* ${outdir}
outdir="results/paper/models/einstein"
./run bmf_learn_exp -i 1 -l 4 -k 20 -I 1 $* data/einstein.pbm -v
./run bmf_learn_tool -i 1 -l 4 -k 20 -I 1 $* data/einstein.pbm -v
mkdir -p ${outdir}
rm ${outdir}/*
mv *pbm latest/* ${outdir}
#!/bin/bash
make -C src -j 4
make -C code -j 4
outdir="results/paper/models-kprox/mnist"
./run bmf_learn_exp -i 1 -l 4 -k 10 -m 1 -d 1 $* data/mnist_data.pbm -v
./run bmf_learn_tool -i 1 -l 4 -k 10 -m 1 -d 1 $* data/mnist_data.pbm -v
mkdir -p ${outdir}
rm ${outdir}/*
mv *pbm latest/* ${outdir}
outdir="results/paper/models-kprox/usps"
./run bmf_learn_exp -i 1 -l 4 -k 10 -m 1 -d 1 $* data/usps_data.pbm -v
./run bmf_learn_tool -i 1 -l 4 -k 10 -m 1 -d 1 $* data/usps_data.pbm -v
mkdir -p ${outdir}
rm ${outdir}/*
mv *pbm latest/* ${outdir}
outdir="results/paper/models-kprox/einstein"
./run bmf_learn_exp -i 1 -l 4 -k 20 -I 1 -d 1 $* data/einstein.pbm -v
./run bmf_learn_tool -i 1 -l 4 -k 20 -I 1 -d 1 $* data/einstein.pbm -v
mkdir -p ${outdir}
rm ${outdir}/*
mv *pbm latest/* ${outdir}
......@@ -7,12 +7,12 @@ ln -s res/${PRG}-${d} latest
#
# copy snapshot of sources
#
cp -r src run latest/
cp -r code run latest/
#
# dump output to log file
#
echo "$*" | tee latest/${PRG}-${d}.cmd
time ./src/$* | tee latest/${PRG}-${d}.log
time ./code/$* | tee latest/${PRG}-${d}.log
#mkdir latest/work
#mv -f work/* latest/work/
mv -f *.p?m latest/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment