-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_end_to_end.qb.sh
executable file
·38 lines (32 loc) · 1.1 KB
/
run_end_to_end.qb.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
set -ex
export RUN=31_qb_regression_4d
export DRD=datalogger_firmware/data/2d_embed_interp/wide_freq_range/24kHz
export FILTER_D=4
[ ! -d runs/$RUN ] && mkdir runs/$RUN
unset CUDA_VISIBLE_DEVICES
time python3 -m qkeras_version.train \
--run $RUN \
--data-root-dir $DRD \
--num-layers 3 --in-out-d 4 --filter-size $FILTER_D \
--num-train-egs 20000 --epochs 5 --learning-rate 1e-3 --l2 0.0001 \
| tee runs/$RUN/qkeras_version.train.out
export CUDA_VISIBLE_DEVICES=""
time python3 -m fxpmath_version.test \
--data-root-dir $DRD \
--load-weights runs/$RUN/weights/qkeras/latest.pkl \
--layer-info runs/$RUN/qkeras_model.layer_info.json \
--test-x-dir runs/$RUN/test_x_files/ \
--plot-dir runs/$RUN/ \
--write-verilog-weights runs/$RUN/weights/verilog/latest \
--num-test-egs 300 \
| tee runs/$RUN/fxpmath_version.test.out
unset CUDA_VISIBLE_DEVICES
pushd sverilog_version/src
[ -f network.sv ] && rm network.sv
ln -s qb_network.sv network.sv
popd
# note: make files use FILTER_D
WAVE=sine ./run_make_network.sh
WAVE=ramp ./run_make_network.sh
WAVE=square ./run_make_network.sh
WAVE=zigzag ./run_make_network.sh