Skip to content

Commit 80dff46

Browse files
authored
[Cleanup] remove print statements in tests (#1287)
* [Cleanup] remove print statements in tests * Fix formatting
1 parent 5bfca55 commit 80dff46

File tree

5 files changed

+2
-9
lines changed

5 files changed

+2
-9
lines changed

keras_cv/bounding_box/iou_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def test_compute_single_iou(self):
2626
# area of bb1 and bb1_off_by_1 are each 10000.
2727
# intersection area is 99*99=9801
2828
# iou=9801/(2*10000 - 9801)=0.96097656633
29-
print(iou_lib.compute_iou(bb1, bb1_off_by_1, "yxyx"))
3029
self.assertAlmostEqual(
3130
iou_lib.compute_iou(bb1, bb1_off_by_1, "yxyx")[0], 0.96097656633
3231
)

keras_cv/models/object_detection3d/center_pillar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(
4949
# 8:end outputs is for bin-based classification and regression
5050
size += 2 * num_head_bin[i]
5151
self._per_class_prediction_size.append(size)
52-
print("per class prediction size {}".format(self._per_class_prediction_size))
52+
5353
if not share_head:
5454
for i in range(num_class):
5555
# 1x1 conv for each voxel/pixel.

keras_cv/models/object_detection3d/center_pillar_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ def test_center_pillar_call(self):
8888
outputs = model(point_xyz, point_feature, point_mask, training=True)
8989
self.assertEqual(outputs["class_1"].shape, [2, 400, 400, 12])
9090
self.assertEqual(outputs["class_2"].shape, [2, 400, 400, 12])
91-
for k, v in outputs.items():
92-
print(k, v.shape)
9391

9492
def test_center_pillar_predict(self):
9593
voxel_net = DynamicVoxelization(

keras_cv/models/segmentation/deeplab_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,9 @@ def keep_image_and_mask_only(data):
157157
metrics=["accuracy"],
158158
)
159159

160-
model_history = model.fit(
160+
model.fit(
161161
training_dataset, epochs=epochs, steps_per_epoch=num_images // batch_size
162162
)
163-
print(model_history)
164163

165164

166165
if __name__ == "__main__":

keras_cv/ops/within_box_3d_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# ==============================================================================
1515

1616
import os
17-
from datetime import datetime
1817

1918
import numpy as np
2019
import pytest
@@ -139,7 +138,6 @@ def test_batched_unrotated(self):
139138
]
140139
* 2
141140
).astype("float32")
142-
print(points.shape)
143141
res = keras_cv.ops.within_box3d_index(points, boxes)
144142
self.assertAllEqual(
145143
[[0, 0, -1, 0, -1, -1, -1], [-1, -1, -1, -1, -1, 0, -1]], res
@@ -183,7 +181,6 @@ def test_many_points(self):
183181
points, boxes = get_points_boxes()
184182

185183
for _ in range(5):
186-
print(datetime.now())
187184
res = keras_cv.ops.within_box3d_index(points, boxes)
188185
self.assertAllClose(res.shape, points.shape[:1])
189186

0 commit comments

Comments
 (0)