Fixed LayerNormalization eps bug (#589)

This commit is contained in:
shijie001 2023-05-22 14:13:44 +08:00 committed by GitHub
parent 99606fd891
commit 51faf286c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class LayerNormalization : public BuiltinOp {
protected:
int32_t axis_;
int32_t eps_;
float eps_;
};
} // namespace ops

View File

@ -37,7 +37,7 @@ LayerNormalization::LayerNormalization(Graph* graph, int32_t axis, float eps)
VSILOGE("Layer norm only support axis 0.");
assert(false);
}
this->impl()->node()->nn_param.instancenorm.eps = eps_;
this->impl()->node()->nn_param.layernorm.eps = eps_;
}
std::shared_ptr<Operation> LayerNormalization::Clone(