As the screenshort, the position of the red frame should be -INFINITY. Secondly, if the output1 is -INFINITY, the output2, argmax, should be the first index in the rois, not be -1.
Could you create an issue on GitHub so that the code owners could have a look at it and discuss the issue, please?