Pytorch 1.4 Tracer warning help

Hi!
I’ experimenting with converting Pytorch models to ONNX using this repository(repo) - It is basically implementation of SSD.

Tracer argues at this script that computes coordinates for prior boxes.(script)
Specifically this code - where tensor is converted into python range:

 for i, j in product(range(f), repeat=2):
                f_k = self.image_size / self.steps[k]
                # unit center x,y
                cx = (j + 0.5) / f_k
                cy = (i + 0.5) / f_k

After that the whole process hangs. Any idea what might cause this or suggestions how to rewrite this part?

Thanks a lot for your help!

What kind of warning do you get?
Is the warning thrown right before the hang occurs?

Sorry, the warning is this:

TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!