mirror of
https://github.com/xiph/opus.git
synced 2025-05-17 08:58:30 +00:00
Using non-cudnn version of the GRU for the weights
Not sure how the layout of the CuDNN version is
This commit is contained in:
parent
b0c61158f7
commit
d93239e955
2 changed files with 12 additions and 7 deletions
|
@ -47,8 +47,8 @@ def dump_gru_layer(self, f, hf):
|
|||
activation = self.activation.__name__.upper()
|
||||
else:
|
||||
activation = 'TANH'
|
||||
if hasattr(self, 'reset_after'):
|
||||
reset_after = self.reset_after
|
||||
if hasattr(self, 'reset_after') and not self.reset_after:
|
||||
reset_after = 0
|
||||
else:
|
||||
reset_after = 1
|
||||
f.write('const GRULayer {} = {{\n {}_bias,\n {}_weights,\n {}_recurrent_weights,\n {}, {}, ACTIVATION_{}, {}\n}};\n\n'
|
||||
|
@ -97,7 +97,7 @@ def dump_mdense_layer(self, f, hf):
|
|||
MDense.dump_layer = dump_mdense_layer
|
||||
|
||||
|
||||
model, _, _ = lpcnet.new_lpcnet_model(rnn_units1=640)
|
||||
model, _, _ = lpcnet.new_lpcnet_model(rnn_units1=640, use_gpu=False)
|
||||
model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['sparse_categorical_accuracy'])
|
||||
#model.summary()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue