Skip to content

Commit

Permalink
Update weight-shrinking script
Browse files Browse the repository at this point in the history
  • Loading branch information
jmvalin committed Feb 20, 2024
1 parent d9d0e72 commit 6ac0c87
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions scripts/shrink_model.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
#!/bin/sh

for i in fargan_data.c pitchdnn_data.c dred_rdovae_dec_data.c dred_rdovae_enc_data.c
for i in fargan_data.c pitchdnn_data.c dred_rdovae_dec_data.c dred_rdovae_enc_data.c plc_data.c lace_data.c nolace_data.c
do
cat dnn/$i | perl -ne 'if (/DEBUG/ || /#else/) {$skip=1} if (!$skip && !/ifdef DOT_PROD/) {s/^ *//; s/, /,/g; print $_} elsif (/endif/) {$skip=0}' > tmp_data.c
mv tmp_data.c dnn/$i
done

for i in plc_data.c
do
cat dnn/$i | perl -ne 'if (/#else.*DOT_PROD/) {$skip=1} if (!$skip && !/ifdef DOT_PROD/) {s/^ *//; s/, /,/g; print $_} elsif (/endif.*DOT_PROD/) {$skip=0}' > tmp_data.c
mv tmp_data.c dnn/$i
done

0 comments on commit 6ac0c87

Please sign in to comment.