-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdemo-tk.sh
executable file
·38 lines (32 loc) · 941 Bytes
/
demo-tk.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
cd $(dirname $(readlink -f $0))
OUTPUT_DIR_PATH=/home/${USER}/tmp/DBTF/tk
rm -rf ${OUTPUT_DIR_PATH}
mkdir -p ${OUTPUT_DIR_PATH}
if [[ ! -d "${OUTPUT_DIR_PATH}" ]]; then
echo "unable to make output directory: ${OUTPUT_DIR_PATH}"
exit 1
fi
hadoop fs -rm -r -f sample.tensor
hadoop fs -put sample.tensor sample.tensor
echo "Executing DBTF for Boolean TK factorization on sample.tensor..."
./dbtf.sh \
--factorization-method tk \
--base-index 0 \
--rank1 4 \
--rank2 4 \
--rank3 4 \
--mode1-length 30 \
--mode2-length 40 \
--mode3-length 50 \
--initial-factor-matrix-density 0.01 \
--initial-core-tensor-density 0.125 \
--converge-by-num-iters 10 \
--num-unfolded-tensor-partitions 8 \
--num-input-tensor-partitions 8 \
--output-dir-path ${OUTPUT_DIR_PATH} \
--output-file-prefix sample \
--tensor-file-separator-type csv \
--compute-error every \
sample.tensor
echo -e "\nOutput saved to ${OUTPUT_DIR_PATH}\n"