Skip to content

Instantly share code, notes, and snippets.

@arunm8489
Last active June 3, 2020 15:01
Show Gist options
  • Save arunm8489/3dcb5d89ab38de5d2027088e8938a285 to your computer and use it in GitHub Desktop.
Save arunm8489/3dcb5d89ab38de5d2027088e8938a285 to your computer and use it in GitHub Desktop.
elif block["type"] == "yolo":
mask = block["mask"].split(",")
mask = [int(m) for m in mask]
anchors = block["anchors"].split(",")
anchors = [(int(anchors[i]), int(anchors[i + 1])) for i in range(0, len(anchors), 2)]
anchors = [anchors[i] for i in mask]
block["anchors"] = anchors
detectorLayer = DetectionLayer(anchors)
seq.add_module("Detection_{0}".format(i),detectorLayer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment