Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/paddle/fluid/tests/unittests/test_eye_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TestEyeOp(OpTest):

def setUp(self):
'''
Test eye op with specified shape
Test eye op with specified shape
'''
self.python_api = paddle.eye
self.op_type = "eye"
Expand All @@ -52,7 +52,7 @@ class TestEyeOp1(OpTest):

def setUp(self):
'''
Test eye op with default parameters
Test eye op with default parameters
'''
self.python_api = paddle.eye
self.op_type = "eye"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ def _box_to_delta(ex_boxes, gt_boxes, weights):
def _expand_bbox_targets(bbox_targets_input, class_nums, is_cls_agnostic):
class_labels = bbox_targets_input[:, 0]
fg_inds = np.where(class_labels > 0)[0]
#if is_cls_agnostic:
# class_labels = [1 if ll > 0 else 0 for ll in class_labels]
# class_labels = np.array(class_labels, dtype=np.int32)
# class_nums = 2
# if is_cls_agnostic:
# class_labels = [1 if ll > 0 else 0 for ll in class_labels]
# class_labels = np.array(class_labels, dtype=np.int32)
# class_nums = 2
bbox_targets = np.zeros((class_labels.shape[0],
4 * class_nums if not is_cls_agnostic else 4 * 2))
bbox_inside_weights = np.zeros(bbox_targets.shape)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def filter_boxes(boxes, min_size, im_info, pixel_offset=True):

def iou(box_a, box_b, pixel_offset=True):
"""
Apply intersection-over-union overlap between box_a and box_b
Apply intersection-over-union overlap between box_a and box_b
"""
xmin_a = min(box_a[0], box_a[2])
ymin_a = min(box_a[1], box_a[3])
Expand Down
4 changes: 2 additions & 2 deletions python/paddle/fluid/tests/unittests/test_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,8 @@ def test_dropout_with_determinate_seed(self):
def test_dropout_with_seed(self):
"""
when we recompute a dropout op, make sure that the recomputed one
is the same as the original var.
"""
is the same as the original var.
"""

def gen_data():
return {
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/fluid/tests/unittests/test_recurrent_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ class RecurrentOpStopGradientTest(RecurrentOpTest1):
h_t = \sigma (W x_t + U h_{t-1})
weights:
- W
- U
- U
vars:
- x
memories:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def filter_boxes(boxes, min_size, im_shape, pixel_offset=True):

def iou(box_a, box_b, pixel_offset=True):
"""
Apply intersection-over-union overlap between box_a and box_b
Apply intersection-over-union overlap between box_a and box_b
"""
xmin_a = min(box_a[0], box_a[2])
ymin_a = min(box_a[1], box_a[3])
Expand Down