Skip to content

Commit 9be219b

Browse files
SigureMoumiswing
authored andcommitted
[CodeStyle] remove tabs in python fluid unittests (PaddlePaddle#46357)
1 parent 708792d commit 9be219b

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TestEyeOp(OpTest):
3131

3232
def setUp(self):
3333
'''
34-
Test eye op with specified shape
34+
Test eye op with specified shape
3535
'''
3636
self.python_api = paddle.eye
3737
self.op_type = "eye"
@@ -52,7 +52,7 @@ class TestEyeOp1(OpTest):
5252

5353
def setUp(self):
5454
'''
55-
Test eye op with default parameters
55+
Test eye op with default parameters
5656
'''
5757
self.python_api = paddle.eye
5858
self.op_type = "eye"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ def _box_to_delta(ex_boxes, gt_boxes, weights):
231231
def _expand_bbox_targets(bbox_targets_input, class_nums, is_cls_agnostic):
232232
class_labels = bbox_targets_input[:, 0]
233233
fg_inds = np.where(class_labels > 0)[0]
234-
#if is_cls_agnostic:
235-
# class_labels = [1 if ll > 0 else 0 for ll in class_labels]
236-
# class_labels = np.array(class_labels, dtype=np.int32)
237-
# class_nums = 2
234+
# if is_cls_agnostic:
235+
# class_labels = [1 if ll > 0 else 0 for ll in class_labels]
236+
# class_labels = np.array(class_labels, dtype=np.int32)
237+
# class_nums = 2
238238
bbox_targets = np.zeros((class_labels.shape[0],
239239
4 * class_nums if not is_cls_agnostic else 4 * 2))
240240
bbox_inside_weights = np.zeros(bbox_targets.shape)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def filter_boxes(boxes, min_size, im_info, pixel_offset=True):
213213

214214
def iou(box_a, box_b, pixel_offset=True):
215215
"""
216-
Apply intersection-over-union overlap between box_a and box_b
216+
Apply intersection-over-union overlap between box_a and box_b
217217
"""
218218
xmin_a = min(box_a[0], box_a[2])
219219
ymin_a = min(box_a[1], box_a[3])

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,8 +1041,8 @@ def test_dropout_with_determinate_seed(self):
10411041
def test_dropout_with_seed(self):
10421042
"""
10431043
when we recompute a dropout op, make sure that the recomputed one
1044-
is the same as the original var.
1045-
"""
1044+
is the same as the original var.
1045+
"""
10461046

10471047
def gen_data():
10481048
return {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ class RecurrentOpStopGradientTest(RecurrentOpTest1):
619619
h_t = \sigma (W x_t + U h_{t-1})
620620
weights:
621621
- W
622-
- U
622+
- U
623623
vars:
624624
- x
625625
memories:

python/paddle/fluid/tests/unittests/xpu/test_generate_proposals_v2_op_xpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def filter_boxes(boxes, min_size, im_shape, pixel_offset=True):
132132

133133
def iou(box_a, box_b, pixel_offset=True):
134134
"""
135-
Apply intersection-over-union overlap between box_a and box_b
135+
Apply intersection-over-union overlap between box_a and box_b
136136
"""
137137
xmin_a = min(box_a[0], box_a[2])
138138
ymin_a = min(box_a[1], box_a[3])

0 commit comments

Comments
 (0)