shithub: opus

Download patch

ref: b90729b83bc52dcf77217242066b387077710c87
parent: 4322c16335860985d857e507d45b98e5b3d73896
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Tue Jul 20 13:01:54 EDT 2021

dump_lpcnet.py now checks the size of GRU B

--- a/dnn/training_tf2/dump_lpcnet.py
+++ b/dnn/training_tf2/dump_lpcnet.py
@@ -235,8 +235,9 @@
 filename = sys.argv[1]
 with h5py.File(filename, "r") as f:
     units = min(f['model_weights']['gru_a']['gru_a']['recurrent_kernel:0'].shape)
+    units2 = min(f['model_weights']['gru_b']['gru_b']['recurrent_kernel:0'].shape)
 
-model, _, _ = lpcnet.new_lpcnet_model(rnn_units1=units)
+model, _, _ = lpcnet.new_lpcnet_model(rnn_units1=units, rnn_units2=units2)
 model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['sparse_categorical_accuracy'])
 #model.summary()
 
--