summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Richards <hg-yff@gregor.im>2018-08-30 17:21:52 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2019-05-29 00:37:08 -0400
commit9aff6a729f0158b8f9f1743ad498863bfd94ad86 (patch)
tree3fdedbfc6ae10a4240027621b8e0ddbe7e7062a1
parent02105923baab17a00f68ee5b5ca069c84edacc91 (diff)
downloadrnnoise-9aff6a729f0158b8f9f1743ad498863bfd94ad86.tar.gz
rnnoise-9aff6a729f0158b8f9f1743ad498863bfd94ad86.tar.bz2
rnnoise-9aff6a729f0158b8f9f1743ad498863bfd94ad86.zip
Adding instructions on training.
-rw-r--r--TRAINING11
-rwxr-xr-xtraining/rnn_train.py4
2 files changed, 13 insertions, 2 deletions
diff --git a/TRAINING b/TRAINING
new file mode 100644
index 0000000..86c5a4e
--- /dev/null
+++ b/TRAINING
@@ -0,0 +1,11 @@
+(1) cd src ; ./compile.sh
+
+(2) ./denoise_training signal.raw noise.raw count > training.f32
+
+ (note the matrix size and replace 500000 87 below)
+
+(3) cd training ; ./bin2hdf5.py ../src/training.f32 500000 87 training.h5
+
+(4) ./rnn_train.py
+
+(5) ./dump_rnn.py weights.hdf5 ../src/rnn_data.c ../src/rnn_data.h
diff --git a/training/rnn_train.py b/training/rnn_train.py
index bb53f89..06d7e1a 100755
--- a/training/rnn_train.py
+++ b/training/rnn_train.py
@@ -82,7 +82,7 @@ model.compile(loss=[mycost, my_crossentropy],
batch_size = 32
print('Loading data...')
-with h5py.File('denoise_data9.h5', 'r') as hf:
+with h5py.File('training.h5', 'r') as hf:
all_data = hf['data'][:]
print('done.')
@@ -113,4 +113,4 @@ model.fit(x_train, [y_train, vad_train],
batch_size=batch_size,
epochs=120,
validation_split=0.1)
-model.save("newweights9i.hdf5")
+model.save("weights.hdf5")