提交 e519a1fc 编写于 作者: C chengjuntao 提交者: Tao Luo

add bigger shape test example for elementwise_pow OP (#22063)

上级 8b3ef2a5
......@@ -35,6 +35,26 @@ class TestElementwisePowOp(OpTest):
self.check_grad(['X', 'Y'], 'Out')
class TestElementwisePowOp_big_shape_1(TestElementwisePowOp):
def setUp(self):
self.op_type = "elementwise_pow"
self.inputs = {
'X': np.random.uniform(0.1, 1, [100, 100]).astype("float64"),
'Y': np.random.uniform(0.1, 1, [100, 100]).astype("float64")
}
self.outputs = {'Out': np.power(self.inputs['X'], self.inputs['Y'])}
class TestElementwisePowOp_big_shape_2(TestElementwisePowOp):
def setUp(self):
self.op_type = "elementwise_pow"
self.inputs = {
'X': np.random.uniform(0.1, 1, [100, 100]).astype("float64"),
'Y': np.random.uniform(0.1, 1, [100, 100]).astype("float64") * 20
}
self.outputs = {'Out': np.power(self.inputs['X'], self.inputs['Y'])}
class TestElementwisePowOp_scalar(TestElementwisePowOp):
def setUp(self):
self.op_type = "elementwise_pow"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册