Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs
Apache License 2.0
1.56k stars 216 forks source link

How to install it on CPU win 64 to use it in Matlab? #171

Closed WuSiren closed 4 years ago

WuSiren commented 4 years ago

How to install it on CPU win 64 to use it in Matlab?

QinbinLi commented 4 years ago

Please refer to the doc to install the library on CPU. To use it in Matlab, you can refer to this doc.

QinbinLi commented 4 years ago

It seems you compile with the GPU option. Did you follow the instructions in the doc? You should use the instruction "cmake -DUSE_CUDA=OFF -DUSE_EIGEN=ON .." to turn off the GPU option.

QinbinLi commented 4 years ago

I just notice that you are using Windows. So the compile instruction should be cmake .. -DUSE_CUDA=OFF -DUSE_EIGEN=ON -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE -DBUILD_SHARED_LIBS=TRUE -G "Visual Studio 14 2015 Win64". You can refer to here.

QinbinLi commented 4 years ago

Yes, you should open the thundersvm.sln file to compile it. I think a possible issue is the version of your Visual Studio. We have tried VS 2015 and VS2017 and they all work fine. I suggest you update your VS version and try again. I'm sorry that we're not willing to test it on older versions. If you still encounter problems, it would be better if you can attach the outputs.

QinbinLi commented 4 years ago

The error message showsfatal error C1083: 无法打开包括文件: “Eigen/Dense”: No such file or directory. Did you install the eigen library? After clone ThunderSVM, you can install the eigen library using the following instruction. git submodule init eigen && git submodule update

QinbinLi commented 4 years ago

You can refer to this doc. You should use the instructions git submodule init eigen and git submodule update under ThunderSVM directory. You can input the instructions in windows shell.

QinbinLi commented 4 years ago

&& is not supported in Windows. Try to input these two instructions separately (first input git submodule init eigen and then input git submodule update).

zeyiwen commented 4 years ago

@WuSiren Hi there. We are trying to help. But, would you please read these 10 golden rules of asking questions in the OpenSource community first?

QinbinLi commented 4 years ago

The format of parameters means we have the same parameter with LIBSVM (e.g., -c, -g). However, the usage of the matlab interface is not the same. Here is an example in the doc. You can refer to the example and replace the parameters.

For the second question, I'm sorry that ThunderSVM doesn't support customized kernel now. We may try to support it in the future.