浏览代码

Update tf.js (#916)

Lutz Roeder 3 年之前
父节点
当前提交
58a08cd02a
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      source/tf.js

+ 4 - 0
source/tf.js

@@ -1091,6 +1091,10 @@ tf.Attribute = class {
             this._type = schema.type;
         }
         switch (value.value) {
+            case undefined:
+                this._type = '';
+                this._value = null;
+                break;
             case 'type':
                 this._type = 'type';
                 this._value = tf.Utility.dataType(value.type);