Skip to content

Commit 0b75bab

Browse files
committed
修改conv_3d_transpose单测的格式
1 parent 272ec56 commit 0b75bab

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -554,17 +554,19 @@ def init_op_type(self):
554554
self.use_cudnn = True
555555
self.op_type = "conv3d_transpose"
556556

557+
557558
class TestConv3dTranspose(unittest.TestCase):
558559
def error_weight_input(self):
559560
array = np.array([1], dtype=np.float32)
560-
x = paddle.to_tensor(np.reshape(array, [1, 1, 1, 1, 1]), dtype='float32')
561+
x = paddle.to_tensor(
562+
np.reshape(array, [1, 1, 1, 1, 1]), dtype='float32'
563+
)
561564
weight = paddle.to_tensor(np.reshape(array, [1]), dtype='float32')
562565
paddle.nn.functional.conv3d_transpose(x, weight, bias=0)
563566

564567
def test_type_error(self):
565-
self.assertRaises(
566-
ValueError, self.error_weight_input
567-
)
568+
self.assertRaises(ValueError, self.error_weight_input)
569+
568570

569571
if __name__ == '__main__':
570572
unittest.main()

0 commit comments

Comments
 (0)