"vscode:/vscode.git/clone" did not exist on "2bce175d156b5c5c1be925cb57fe33215675fafd"
Unverified Commit 09deac52 authored by Qi's avatar Qi Committed by GitHub
Browse files

change the default anchor generator setting (#2722)

Change the default anchor generator settings to default Faster RCNN version(without FPN), so it is hopefully less misleading. Also add an assert to grad_anchors functions to make sure people use it as it is aspected.
parent e7c0abac
...@@ -52,8 +52,8 @@ class AnchorGenerator(nn.Module): ...@@ -52,8 +52,8 @@ class AnchorGenerator(nn.Module):
def __init__( def __init__(
self, self,
sizes=(128, 256, 512), sizes=((128, 256, 512),),
aspect_ratios=(0.5, 1.0, 2.0), aspect_ratios=((0.5, 1.0, 2.0),),
): ):
super(AnchorGenerator, self).__init__() super(AnchorGenerator, self).__init__()
...@@ -118,6 +118,7 @@ class AnchorGenerator(nn.Module): ...@@ -118,6 +118,7 @@ class AnchorGenerator(nn.Module):
anchors = [] anchors = []
cell_anchors = self.cell_anchors cell_anchors = self.cell_anchors
assert cell_anchors is not None assert cell_anchors is not None
assert len(grid_sizes) == len(strides) == len(cell_anchors)
for size, stride, base_anchors in zip( for size, stride, base_anchors in zip(
grid_sizes, strides, cell_anchors grid_sizes, strides, cell_anchors
......
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