I’ve passed all the tests in the notebook, but the grader is showing 0/100 and posting the error below:
Cell #5. Can’t compile the student’s code. Error: SyntaxError(‘invalid syntax’, (’/tmp/student_solution_cells/cell_5.py’, 35, 1058, ‘yolo_filter_boxes’’’
\n## Test case 1: boxes intersect
\nbox1 = (2, 1, 4, 3)
\nbox2 = (1, 2, 3, 4)
\n
\nprint("iou for intersecting boxes = " + str(iou(box1, box2)))
\nassert iou(box1, box2) < 1, “The intersection area must be always smaller or equal than the union area.”
\nassert np.isclose(iou(box1, box2), 0.14285714), “Wrong value. Check your implementation. Problem with intersecting boxes”
\n
\n## Test case 2: boxes do not intersect
\nbox1 = (1,2,3,4)
\nbox2 = (5,6,7,8)
\nprint("iou for non-intersecting boxes = " + str(iou(box1,box2)))
\nassert iou(box1, box2) == 0, “Intersection must be 0”
\n
\n## Test case 3: boxes intersect at vertices only
\nbox1 = (1,1,2,2)
\nbox2 = (2,2,3,3)
\nprint(“iou for boxes that only touch at vertices = " + str(iou(box1,box2)))
\nassert iou(box1, box2) == 0, “Intersection at vertices must be 0”
\n
\n## Test case 4: boxes intersect at edge only
\nbox1 = (1,1,3,3)\nbox2 = (2,3,3,4)
\nprint(“iou for boxes that only touch at edges = " + str(iou(box1,box2)))
\nassert iou(box1, box2) == 0, “Intersection at edges must be 0”
\n\nprint(”\033[92m All tests passed!”)
\n’’’
\n’))