繁体   English   中英

使用StringSubsequenceKernel的退出代码139(信号11:SIGSEGV中断)完成的过程

[英]Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) with StringSubsequenceKernel

我很长时间试图安装将军库以使用StringSubsecuenceKernel。 最终我为python 2.7做了它。我使用了该站点另一个答案中的代码示例

from shogun.Features import *
from shogun.Kernel import *
from shogun.Classifier import *
from shogun.Evaluation import *
from modshogun import StringCharFeatures, RAWBYTE
from shogun.Kernel import StringSubsequenceKernel
import numpy
strings = ['cat', 'doom', 'car', 'boom']
test = ['bat', 'soon']
train_labels  = numpy.array([1, -1, 1, -1])
test_labels = numpy.array([1, -1])
features = StringCharFeatures(strings, RAWBYTE)
test_features = StringCharFeatures(test, RAWBYTE)
# 1 is n and 0.5 is lambda as described in Lodhi 2002
sk = StringSubsequenceKernel(features, features, 2, 0.5)

然后当我尝试这样做

del sk

它给我以下错误

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

我正在使用pycharm社区版2017.2.4,将shogun库安装在/usr/lib/python2.7/dist-packages/shogun通常已安装的软件包出现在/usr/local/lib/python2.7/dist-中包目录,但这不是。 问题是,为什么会出现此错误?如何避免该错误? 感谢您的回答。

幕府将军使用的是什么版本?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM