Skip to content

Fix invalid argument of clip when running ssd inference #1026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gluoncv/nn/coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ class NormalizedBoxCenterDecoder(gluon.HybridBlock):
----------
stds : array-like of size 4
Std value to be divided from encoded values, default is (0.1, 0.1, 0.2, 0.2).
clip : float, default is None
clip : float, default is -1.0
If given, bounding box target will be clipped to this value.
convert_anchor : boolean, default is False
Whether to convert anchor from corner to center format.

"""

def __init__(self, stds=(0.1, 0.1, 0.2, 0.2), convert_anchor=False, clip=None):
def __init__(self, stds=(0.1, 0.1, 0.2, 0.2), convert_anchor=False, clip=-1.0):
super(NormalizedBoxCenterDecoder, self).__init__()
assert len(stds) == 4, "Box Encoder requires 4 std values."
self._stds = stds
Expand Down