-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_end_to_end.po2.sh
executable file
·39 lines (33 loc) · 1.2 KB
/
run_end_to_end.po2.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
39
set -ex
export RUN=32_po2_regression_8d_16d
export DRD=datalogger_firmware/data/2d_embed_interp/wide_freq_range/24kHz
export FILTER_D=8
export FILTER_PO2_D=16
[ ! -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 --po2-filter-size $FILTER_PO2_D \
# --num-train-egs 50000 --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 \
> runs/$RUN/fxpmath_version.test.out
unset CUDA_VISIBLE_DEVICES
# pushd sverilog_version/src
# [ -f network.sv ] && rm network.sv
# ln -s po2_network.sv network.sv
# popd
# # # note: make files use FILTER_D & FILTER_PO2_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