I’m not familiar with your code, but it seems boxes1 is passed as a LongTensor, while boxes2 is a FloatTensor. Could this be the case?
If so, you could call float() in the first or long() on the second argument, depending on your expected result.