mirror of
https://github.com/xiph/opus.git
synced 2025-05-17 08:58:30 +00:00
Implement MDense
This commit is contained in:
parent
d4046036a9
commit
66486004ba
2 changed files with 23 additions and 4 deletions
|
@ -80,8 +80,8 @@ def dump_mdense_layer(self, f, hf):
|
|||
printVector(f, weights[1], name + '_bias')
|
||||
printVector(f, weights[1], name + '_factor')
|
||||
activation = self.activation.__name__.upper()
|
||||
f.write('const MDenseLayer {} = {{\n {}_bias,\n {}_weights,\n {}_factor,\n {}, {}, ACTIVATION_{}\n}};\n\n'
|
||||
.format(name, name, name, name, weights[0].shape[0], weights[0].shape[1], activation))
|
||||
f.write('const MDenseLayer {} = {{\n {}_bias,\n {}_weights,\n {}_factor,\n {}, {}, {}, ACTIVATION_{}\n}};\n\n'
|
||||
.format(name, name, name, name, weights[0].shape[0], weights[0].shape[1], weights[0].shape[2], activation))
|
||||
hf.write('#define {}_SIZE {}\n'.format(name.upper(), weights[0].shape[0]))
|
||||
hf.write('extern const MDenseLayer {};\n\n'.format(name));
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue