Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
py-faster-rcnn
Commits
19062d51
Commit
19062d51
authored
Oct 20, 2015
by
Ross Girshick
Browse files
bug fix (*fast-rcnn* issue #69; thanks to @guyrose3 for pointing this out)
parent
54d2576f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/train_svms.py
View file @
19062d51
...
...
@@ -248,8 +248,13 @@ class SVMClassTrainer(object):
print
((
' {:d}: obj val: {:.3f} = {:.3f} '
'(pos) + {:.3f} (neg) + {:.3f} (reg)'
).
format
(
i
,
*
losses
))
return
((
w
*
self
.
feature_scale
,
b
*
self
.
feature_scale
),
pos_scores
,
neg_scores
)
# Sanity check
scores_ret
=
(
X
*
1.0
/
self
.
feature_scale
).
dot
(
w
.
T
*
self
.
feature_scale
)
+
b
assert
np
.
allclose
(
scores
,
scores_ret
[:,
0
],
atol
=
1e-5
),
\
"Scores from returned model don't match decision function"
return
((
w
*
self
.
feature_scale
,
b
),
pos_scores
,
neg_scores
)
def
append_neg_and_retrain
(
self
,
feat
=
None
,
force
=
False
):
if
feat
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment