提交 5acf1094 编写于 作者: P peixu_ren

Check number validation of power in powertransform

上级 b11ef57b
......@@ -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.
先完成此消息的编辑!
想要评论请 注册