Unpacking a model trained with 64 bit machine on a 32 bit raspberry pi

Viewed 1657

I am getting this error while testing a model trained using 64-bit machine on a 32-bit raspberry pi.

This question has been asked twice years before but still is unanswered.

1) scikits-learn-randomforrest-trained-on-64bit-python-wont-open-on-32bit-python

2) workaround-for-32-64-bit-serialization-exception-on-sklearn-randomforest-model

So to solve the problem If I must train the model with 32-bit then how do I create a virtual environment for it on a 64-bit machine?

Traceback (most recent call last):
  File "main_radar.py", line 49, in <module>
    DT1 = joblib.load('models/DT1.sav')
  File "/usr/local/lib/python2.7/dist-
packages/sklearn/externals/joblib/numpy_pickle.py", line 578, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "/usr/local/lib/python2.7/dist-
packages/sklearn/externals/joblib/numpy_pickle.py", line 508, in 
_unpickle
    obj = unpickler.load()
  File "/usr/lib/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
  File "/usr/lib/python2.7/pickle.py", line 1133, in load_reduce
    value = func(*args)
  File "sklearn/tree/_tree.pyx", line 601, in 
sklearn.tree._tree.Tree.__cinit__
ValueError: Buffer dtype mismatch, expected 'SIZE_t' but got 'long long'

Thank you very much. Would be really helpful if someone can address this issue.

0 Answers
Related