I have done the following:
- Trained a one class classifier in Python using sklearn (svm.OneClassClassifier())
- Dumped the model using joblib dump into a .joblib file
Then I deployed the .joblib file on the Jetson TX1.
Now I am trying to import it using load from joblib
joblib and sklearn are installed on the JetsonTX1
joblib - pip3 install joblib
sklearn - sudo apt install python3-sklearn
But I get the following error when I try to load the model for inference on the Jetson TX1
Traceback (most recent call last):
File “roi.py”, line 19, in
clf = load(“oneclass_hog.joblib”)
File “/home/nvidia/.local/lib/python3.5/site-packages/joblib/numpy_pickle.py”, line 598, in load
obj = _unpickle(fobj, filename, mmap_mode)
File “/home/nvidia/.local/lib/python3.5/site-packages/joblib/numpy_pickle.py”, line 526, in _unpickle
obj = unpickler.load()
File “/usr/lib/python3.5/pickle.py”, line 1039, in load
dispatchkey[0]
File “/usr/lib/python3.5/pickle.py”, line 1334, in load_global
klass = self.find_class(module, name)
File “/usr/lib/python3.5/pickle.py”, line 1384, in find_class
import(module, level=0)
File “/usr/lib/python3/dist-packages/sklearn/svm/init.py”, line 13, in
from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC,
File “/usr/lib/python3/dist-packages/sklearn/svm/classes.py”, line 4, in
from .base import _fit_liblinear, BaseSVC, BaseLibSVM
File “/usr/lib/python3/dist-packages/sklearn/svm/base.py”, line 12, in
from …multiclass import _ovr_decision_function
File “/usr/lib/python3/dist-packages/sklearn/multiclass.py”, line 44, in
from .metrics.pairwise import euclidean_distances
File “/usr/lib/python3/dist-packages/sklearn/metrics/init.py”, line 33, in
from . import cluster
File “/usr/lib/python3/dist-packages/sklearn/metrics/cluster/init.py”, line 19, in
from .unsupervised import silhouette_samples
File “/usr/lib/python3/dist-packages/sklearn/metrics/cluster/unsupervised.py”, line 10, in
from …pairwise import pairwise_distances
File “/usr/lib/python3/dist-packages/sklearn/metrics/pairwise.py”, line 27, in
from …externals.joblib import parallel
ImportError: cannot import name ‘parallel’
Any ideas? Any suggestions to try an alternative way to transfer and use the classifier on Jetson TX1 are also welcome!
Note: The code which is failing (roi.py) is working absolutely fine on my personal computer, its failing only on the Jetson.