Skip to content

Commit fc0d9be

Browse files
authored
fix functions ops summary (#3506)
BUG
1 parent bb76d1e commit fc0d9be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tfjs-converter/tools/model_summary.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ function summarize(argv: string[]) {
3636
if (library != null) {
3737
const functions = library['function'];
3838
// tslint:disable-next-line: no-any
39-
functions.forEach((func: any) => nodes.concat(func['nodeDef']));
39+
if (functions != null) {
40+
functions.forEach((func: any) => nodes.concat(func['nodeDef']));
41+
}
4042
}
4143

4244
const opCount: {[key: string]: number} = {};

0 commit comments

Comments
 (0)