提交 ba2e10d9 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!4774 Check number validation of power in powertransform

Merge pull request !4774 from peixu_ren/custom_pp_ops
......@@ -15,6 +15,7 @@
"""Power Bijector"""
from mindspore.ops import operations as P
from mindspore._checkparam import Validator as validator
from mindspore._checkparam import Rel
from .bijector import Bijector
class PowerTransform(Bijector):
......@@ -53,6 +54,7 @@ class PowerTransform(Bijector):
param = dict(locals()) if param is None else param
super(PowerTransform, self).__init__(name=name, param=param)
validator.check_value_type('power', power, [int, float], self.name)
validator.check_number("power", power, 0, Rel.GE, self.name)
self._power = power
self.pow = P.Pow()
self.exp = P.Exp()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册