Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I build thundersvm followed the guide I can import SVC whitout error, but when I run the script and the process ended after training start INFO immediately #279

Open
root-wang opened this issue May 13, 2024 · 0 comments

Comments

@root-wang
Copy link

root-wang commented May 13, 2024

GPU info :NVIDIA-SMI 535.171.04 Driver Version: 535.171.04 CUDA Version: 12.2 NVIDIA GeForce RTX 3090

(base) root-wang@yao:~/machine-learn/frequenceFinger$  /usr/bin/env /opt/miniconda/envs/rw_torch/bin/python /home/root-wang/.vscode-server/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 51551 -- /home/root-wang/machine-learn/frequenceFinger/model/ML/svm.py 
2024-05-13 18:02:48,635 INFO [default] #instances = 150, #features = 4
2024-05-13 18:02:48,635 INFO [default] #classes = 3
2024-05-13 18:02:48,636 INFO [default] total memory size is 7.34255e-06 max mem size is 8
2024-05-13 18:02:48,636 INFO [default] free mem is 7.99999
2024-05-13 18:02:48,636 INFO [default] working set size = 64
2024-05-13 18:02:48,636 INFO [default] training start
(base) root-wang@yao:~/machine-learn/frequenceFinger$

I build thundersvm followed the guide I can import SVC whitout error, but when I run the script and the process ended after training start INFO immediately

from tabnanny import verbose
from torch import nn, Tensor
import torch

from sklearn.datasets import load_svmlight_file
from thundersvm import SVC
import torch

x, y = load_svmlight_file(
    "/home/root-wang/machine-learn/frequenceFinger/model/ML/test_dataset.txt"
)
clf = SVC(verbose=True, gamma=0.5, C=100)
clf.fit(x, y)

x2, y2 = load_svmlight_file(
    "/home/root-wang/machine-learn/frequenceFinger/model/ML/test_dataset.txt"
)
y_predict = clf.predict(x2)
score = clf.score(x2, y2)
clf.save_to_file("./model")

print("test score is ", score)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant