Skip to content

Commit

Permalink
Fixing lossgen to work with USE_WEIGHTS_FILE
Browse files Browse the repository at this point in the history
Retraining a new model so that we have a matching .pth file.
Also, discarding more data on init to get better randomization.
  • Loading branch information
jmvalin committed May 18, 2024
1 parent 0e564fd commit eb39efa
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -e
srcdir=`dirname $0`
test -n "$srcdir" && cd "$srcdir"

dnn/download_model.sh "8f34305a299183509d22c7ba66790f67916a0fc56028ebd4c8f7b938458f2801"
dnn/download_model.sh "160753e983198f29f1aae67c54caa0e30bd90f1ce916a52f15bdad2df8e35e58"

echo "Updating build configuration files, please wait...."

Expand Down
6 changes: 1 addition & 5 deletions dnn/lossgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ int sample_loss(
so we skip them. */
if (!st->used) {
int i;
for (i=0;i<100;i++) sample_loss_impl(st, percent_loss);
for (i=0;i<1000;i++) sample_loss_impl(st, percent_loss);
st->used = 1;
}
return sample_loss_impl(st, percent_loss);
Expand All @@ -157,11 +157,7 @@ void lossgen_init(LossGenState *st)
{
int ret;
OPUS_CLEAR(st, 1);
#ifndef USE_WEIGHTS_FILE
ret = init_lossgen(&st->model, lossgen_arrays);
#else
ret = 0;
#endif
celt_assert(ret == 0);
(void)ret;
}
Expand Down
28 changes: 28 additions & 0 deletions tar_list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
dnn/models/lace_v2.pth
dnn/models/nolace_v2.pth
dnn/models/nolace_192_v2.pth
dnn/models/nolace_160_v2.pth
dnn/models/fargan48bbr_adv_50.pth
dnn/models/rdovae_sparse5m_32.pth
dnn/models/plc4ar_16.pth
dnn/models/pitch_vsmallconv1.pth
dnn/models/lossgen3_2000.pth
dnn/lace_data.c
dnn/lace_data.h
dnn/nolace_data.c
dnn/nolace_data.h
dnn/fargan_data.c
dnn/fargan_data.h
dnn/pitchdnn_data.c
dnn/pitchdnn_data.h
dnn/plc_data.c
dnn/plc_data.h
dnn/dred_rdovae_constants.h
dnn/dred_rdovae_stats_data.h
dnn/dred_rdovae_enc_data.h
dnn/dred_rdovae_stats_data.c
dnn/dred_rdovae_dec_data.h
dnn/dred_rdovae_enc_data.c
dnn/dred_rdovae_dec_data.c
dnn/lossgen_data.c
dnn/lossgen_data.h

0 comments on commit eb39efa

Please sign in to comment.