-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【Hackathon4】No58. empty #52388
【Hackathon4】No58. empty #52388
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
self.outputs = {'Out': convert_float_to_uint16(output)} | ||
|
||
def test_check_output(self): | ||
self.check_output_customized(self.verify_output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请先使用check_output函数做下对比
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2023-03-31 12:25:37 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 2082, in check_output
2023-03-31 12:25:37 res = self.check_output_with_place(
2023-03-31 12:25:37 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 1951, in check_output_with_place
2023-03-31 12:25:37 static_checker.check()
2023-03-31 12:25:37 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 1716, in check
2023-03-31 12:25:37 self.compare_outputs_with_expects()
2023-03-31 12:25:37 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 1706, in compare_outputs_with_expects
2023-03-31 12:25:37 self.compare_single_output_with_expect(out_name, expect)
2023-03-31 12:25:37 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 1684, in compare_single_output_with_expect
2023-03-31 12:25:37 self._compare_numpy(name, actual_np, expect_np)
2023-03-31 12:25:37 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 1630, in _compare_numpy
2023-03-31 12:25:37 np.testing.assert_allclose(
2023-03-31 12:25:37 File "C:\home\workspace\cache\python_venv\lib\site-packages\numpy\testing_private\utils.py", line 1527, in assert_allclose
2023-03-31 12:25:37 assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
2023-03-31 12:25:37 File "C:\home\workspace\cache\python_venv\lib\site-packages\numpy\testing_private\utils.py", line 844, in assert_array_compare
2023-03-31 12:25:37 raise AssertionError(msg)
2023-03-31 12:25:37 AssertionError:
2023-03-31 12:25:37 Not equal to tolerance rtol=0.01, atol=0.03
2023-03-31 12:25:37 Output (Out) has diff at Place(cpu) in static checker
2023-03-31 12:25:37 Mismatched elements: 115 / 600 (19.2%)
2023-03-31 12:25:37 Max absolute difference: 1.0299661e+30
2023-03-31 12:25:37 Max relative difference: inf
2023-03-31 12:25:37 x: array([[-6.713867e-04, 1.954214e-23, 7.420308e-38],
2023-03-31 12:25:37 [ 0.000000e+00, -9.765625e-04, 1.954214e-23],
2023-03-31 12:25:37 [ 7.420308e-38, 0.000000e+00, -1.586914e-03],...
2023-03-31 12:25:37 y: array([[0., 0., 0.],
2023-03-31 12:25:37 [0., 0., 0.],
2023-03-31 12:25:37 [0., 0., 0.],...
报错,看来是不能用默认的check_output()
@@ -279,6 +280,48 @@ def test_static_graph(self): | |||
self.__check_out__(res_6, dtype) | |||
|
|||
|
|||
class TestEmptyFP16Op(TestEmptyOp): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请先使用check_output函数做下对比
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2023-03-31 12:23:06 static_checker.check()
2023-03-31 12:23:06 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 1716, in check
2023-03-31 12:23:06 self.compare_outputs_with_expects()
2023-03-31 12:23:06 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 1706, in compare_outputs_with_expects
2023-03-31 12:23:06 self.compare_single_output_with_expect(out_name, expect)
2023-03-31 12:23:06 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 1684, in compare_single_output_with_expect
2023-03-31 12:23:06 self._compare_numpy(name, actual_np, expect_np)
2023-03-31 12:23:06 File "C:\home\workspace\Paddle\build\python\paddle\fluid\tests\unittests\eager_op_test.py", line 1642, in _compare_numpy
2023-03-31 12:23:06 + self.checker_name
2023-03-31 12:23:06 File "C:\home\workspace\cache\python_venv\lib\site-packages\numpy\testing_private\utils.py", line 1531, in assert_allclose
2023-03-31 12:23:06 verbose=verbose, header=header, equal_nan=equal_nan)
2023-03-31 12:23:06 File "C:\home\workspace\cache\python_venv\lib\site-packages\numpy\testing_private\utils.py", line 844, in assert_array_compare
2023-03-31 12:23:06 raise AssertionError(msg)
2023-03-31 12:23:06 AssertionError:
2023-03-31 12:23:06 Not equal to tolerance rtol=0.001, atol=0.001
2023-03-31 12:23:06 Output (Out) has diff at Place(cpu) in static checker
2023-03-31 12:23:06 Mismatched elements: 153 / 1500 (10.2%)
2023-03-31 12:23:06 Max absolute difference: nan
2023-03-31 12:23:06 Max relative difference: nan
2023-03-31 12:23:06 x: array([[6.437e-06, 0.000e+00, 0.000e+00],
2023-03-31 12:23:06 [0.000e+00, 2.845e+04, 2.805e-02],
2023-03-31 12:23:06 [3.040e-06, 0.000e+00, nan],...
2023-03-31 12:23:06 y: array([[6.437e-06, 0.000e+00, 0.000e+00],
2023-03-31 12:23:06 [0.000e+00, 2.845e+04, 2.805e-02],
2023-03-31 12:23:06 [3.040e-06, 0.000e+00, nan],...
报错。
@Vvsmile 大佬,有空审下喽 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Others
Describe
Hackathon4 No.58 part2
add empty fp16 and bp16 test case