|
|
@@ -408,7 +408,7 @@ circle.Attribute = class {
|
|
|
this._name = name;
|
|
|
this._value = ArrayBuffer.isView(value) ? Array.from(value) : value;
|
|
|
this._type = metadata && metadata.type ? metadata.type : null;
|
|
|
- if (this._name == 'fused_activation_function') {
|
|
|
+ if (this._name === 'fused_activation_function') {
|
|
|
this._visible = false;
|
|
|
}
|
|
|
if (this._type) {
|
|
|
@@ -417,12 +417,12 @@ circle.Attribute = class {
|
|
|
if (metadata) {
|
|
|
if (metadata.visible === false) {
|
|
|
this._visible = false;
|
|
|
- } else if (Object.prototype.hasOwnProperty.call(metadata, 'default')) {
|
|
|
+ } else if (metadata.default !== undefined) {
|
|
|
value = this._value;
|
|
|
- if (typeof value == 'function') {
|
|
|
+ if (typeof value === 'function') {
|
|
|
value = value();
|
|
|
}
|
|
|
- if (value == metadata.default) {
|
|
|
+ if (value === metadata.default) {
|
|
|
this._visible = false;
|
|
|
}
|
|
|
}
|