|
|
@ -142,14 +142,10 @@ class TestInverseSingularAPI(unittest.TestCase):
|
|
|
|
if core.is_compiled_with_cuda():
|
|
|
|
if core.is_compiled_with_cuda():
|
|
|
|
self.places.append(fluid.CUDAPlace(0))
|
|
|
|
self.places.append(fluid.CUDAPlace(0))
|
|
|
|
|
|
|
|
|
|
|
|
def check_static_result(self, place, with_out=False):
|
|
|
|
def check_static_result(self, place):
|
|
|
|
with fluid.program_guard(fluid.Program(), fluid.Program()):
|
|
|
|
with fluid.program_guard(fluid.Program(), fluid.Program()):
|
|
|
|
input = fluid.data(name="input", shape=[4, 4], dtype="float64")
|
|
|
|
input = fluid.data(name="input", shape=[4, 4], dtype="float64")
|
|
|
|
if with_out:
|
|
|
|
result = paddle.inverse(input=input)
|
|
|
|
out = fluid.data(name="output", shape=[4, 4], dtype="float64")
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
out = None
|
|
|
|
|
|
|
|
result = paddle.inverse(input=input, out=out)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
input_np = np.zeros([4, 4]).astype("float64")
|
|
|
|
input_np = np.zeros([4, 4]).astype("float64")
|
|
|
|
|
|
|
|
|
|
|
|