CNN course - 1st Programming assignment W3

Hello,

I get the following trace-back on my 1st Programming assignment of CNN W3:

AssertionError Traceback (most recent call last)
in
12 box2 = (5,6,7,8)
13 print("iou for non-intersecting boxes = " + str(iou(box1,box2)))
—> 14 assert iou(box1, box2) == 0, “Intersection must be 0”
15
16 ## Test case 3: boxes intersect at vertices only

AssertionError: Intersection must be 0

What would you suggest?

Many thanks, Pilar

For that test case. the boxes do not overlap. So the iou value must be zero.

The test case gives you the box corners. You can work out the solution by hand, and compare it with how your code works.

1 Like