Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.libsvm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.learn.libsvm
Commits
f9ebc80d
There was a problem fetching the pipeline summary.
Commit
f9ebc80d
authored
8 years ago
by
Pavel KORSHUNOV
Browse files
Options
Downloads
Patches
Plain Diff
removed decref of X in training
parent
cb4a5899
No related branches found
No related tags found
1 merge request
!3
Fix segmentation fault when SVM is trained in sequenece. Fixes issue #9
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/learn/libsvm/trainer.cpp
+2
-2
2 additions, 2 deletions
bob/learn/libsvm/trainer.cpp
with
2 additions
and
2 deletions
bob/learn/libsvm/trainer.cpp
+
2
−
2
View file @
f9ebc80d
...
@@ -596,8 +596,8 @@ static PyObject* PyBobLearnLibsvmTrainer_train
...
@@ -596,8 +596,8 @@ static PyObject* PyBobLearnLibsvmTrainer_train
&
PyBlitzArray_OutputConverter
,
&
divide
&
PyBlitzArray_OutputConverter
,
&
divide
))
return
0
;
))
return
0
;
// do not decref X, otherwise it will be deleted by Python
//protects acquired resources through this scope
//protects acquired resources through this scope
auto
X_
=
make_safe
(
X
);
auto
subtract_
=
make_xsafe
(
subtract
);
auto
subtract_
=
make_xsafe
(
subtract
);
auto
divide_
=
make_xsafe
(
divide
);
auto
divide_
=
make_xsafe
(
divide
);
...
@@ -676,7 +676,7 @@ static PyObject* PyBobLearnLibsvmTrainer_train
...
@@ -676,7 +676,7 @@ static PyObject* PyBobLearnLibsvmTrainer_train
else
machine
=
self
->
cxx
->
train
(
Xseq
);
else
machine
=
self
->
cxx
->
train
(
Xseq
);
// Note: This is not a solution. I just want to see if it will work in all CI's
// Note: This is not a solution. I just want to see if it will work in all CI's
PyObject
*
iterator2
=
PyObject_GetIter
(
X
);
//
PyObject* iterator2 = PyObject_GetIter(X);
return
PyBobLearnLibsvmMachine_NewFromMachine
(
machine
);
return
PyBobLearnLibsvmMachine_NewFromMachine
(
machine
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment