bob.learn.libsvm issueshttps://gitlab.idiap.ch/bob/bob.learn.libsvm/-/issues2017-10-21T19:07:03Zhttps://gitlab.idiap.ch/bob/bob.learn.libsvm/-/issues/9SVM in sequence segmenation fault2017-10-21T19:07:03ZTiago de Freitas PereiraSVM in sequence segmenation faultWhen you try to train several SVMs in sequence we have segmentation fault.
Follow a code that reproduces the issue (2 SVMs in sequence):
```
import bob.learn.libsvm
import numpy
numpy.random.seed(10)
for i in range(2):
pos = numpy....When you try to train several SVMs in sequence we have segmentation fault.
Follow a code that reproduces the issue (2 SVMs in sequence):
```
import bob.learn.libsvm
import numpy
numpy.random.seed(10)
for i in range(2):
pos = numpy.random.normal(0., 1, size=(100, 2))
neg = numpy.random.normal(1., 1, size=(100, 2))
data = [pos, neg]
trainer = bob.learn.libsvm.Trainer()
trainer.kernel_type = 'LINEAR'
trainer.cost = 1
trainer.train(data)
```
However, if you free the data variables in the end of loop for, everything runs fine
```
import bob.learn.libsvm
import numpy
numpy.random.seed(10)
for i in range(2):
pos = numpy.random.normal(0., 1, size=(100, 2))
neg = numpy.random.normal(1., 1, size=(100, 2))
data = [pos, neg]
trainer = bob.learn.libsvm.Trainer()
trainer.kernel_type = 'LINEAR'
trainer.cost = 1
trainer.train(data)
del data
del pos
del neg
```
I'm still debugging, but it seems that the issue is somewhere here in the bindings (https://gitlab.idiap.ch/bob/bob.learn.libsvm/blob/master/bob/learn/libsvm/trainer.cpp#L616)Bob 2.7.x releaseTiago de Freitas PereiraTiago de Freitas Pereira