Commit b45cdbfa authored by 7d's avatar 7d Committed by Francisco Massa
Browse files

Fix wrong behavior of Detection Transform Function.(#959) (#960)

Consider the difference of the division operator between Python 2.x and Python 3.x.
parent 1ed61e4b
......@@ -91,8 +91,8 @@ class GeneralizedRCNNTransform(nn.Module):
stride = size_divisible
max_size = list(max_size)
max_size[1] = int(math.ceil(max_size[1] / stride) * stride)
max_size[2] = int(math.ceil(max_size[2] / stride) * stride)
max_size[1] = int(math.ceil(float(max_size[1]) / stride) * stride)
max_size[2] = int(math.ceil(float(max_size[2]) / stride) * stride)
max_size = tuple(max_size)
batch_shape = (len(images),) + max_size
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment