Skip to content

Commit

Permalink
MXNet alphanumberic params identifier (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Dec 16, 2019
1 parent 27c0550 commit d50cd83
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mxnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ mxnet.ModelFactory = class {
if (name.startsWith('arg:') || name.startsWith('aux:')) {
name = key.substring(4);
}
parameters[name] = stream.arrays[key];
parameters['ssd0_' + name] = stream.arrays[key];
}
}
catch (error) {
Expand Down Expand Up @@ -256,9 +256,10 @@ mxnet.ModelFactory = class {
else {
for (let i = 0; i < token.length; i++) {
const c = token.charAt(i);
if (c < '0' || c > '9') {
return null;
if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
continue;
}
return null;
}
}
return dashes.join('-');
Expand Down

0 comments on commit d50cd83

Please sign in to comment.