Skip to content

Commit

Permalink
Update espresso.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jul 19, 2024
1 parent e65e6ea commit 529deb7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
10 changes: 9 additions & 1 deletion source/espresso-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
"name": "batch_norm",
"category": "Normalization"
},
{
"name": "batchnorm",
"category": "Normalization"
},
{
"name": "reshape",
"category": "Shape"
Expand Down Expand Up @@ -73,6 +77,10 @@
},
{
"name": "rnn_arch",
"category": "layer"
"category": "Layer"
},
{
"name": "flatten",
"category": "Shape"
}
]
8 changes: 7 additions & 1 deletion source/espresso.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ espresso.Reader = class {
obj.outputs = [{ name: 'outputs', value: top }];
obj.chain = [];
switch (type) {
case 'convolution': {
case 'convolution':
case 'deconvolution': {
this._weights(obj, data, [data.C, data.K, data.Nx, data.Ny]);
if (data.has_biases) {
obj.inputs.push(this._initializer('biases', data.blob_biases, 'float32', [data.C]));
Expand All @@ -332,6 +333,11 @@ espresso.Reader = class {
}
break;
}
case 'batchnorm': {
obj.inputs.push(this._initializer('params', data.blob_batchnorm_params, 'float32', [4, data.C]));
delete data.blob_batchnorm_params;
break;
}
case 'inner_product': {
this._weights(obj, data, [data.nC, data.nB]);
if (data.has_biases) {
Expand Down

0 comments on commit 529deb7

Please sign in to comment.