Fixed LayerNormalization eps bug (#589)
This commit is contained in:
parent
99606fd891
commit
51faf286c2
|
|
@ -38,7 +38,7 @@ class LayerNormalization : public BuiltinOp {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int32_t axis_;
|
int32_t axis_;
|
||||||
int32_t eps_;
|
float eps_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ops
|
} // namespace ops
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ LayerNormalization::LayerNormalization(Graph* graph, int32_t axis, float eps)
|
||||||
VSILOGE("Layer norm only support axis 0.");
|
VSILOGE("Layer norm only support axis 0.");
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
this->impl()->node()->nn_param.instancenorm.eps = eps_;
|
this->impl()->node()->nn_param.layernorm.eps = eps_;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Operation> LayerNormalization::Clone(
|
std::shared_ptr<Operation> LayerNormalization::Clone(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue