load pretrained pytorch model

141 views
Skip to first unread message

Mohammed Elhmadany

unread,
Dec 9, 2021, 5:01:43 PM12/9/21
to User Group for BigDL and Analytics Zoo
Hello Team, 

I am using a pre-trained PyTorch model for inference task on the cluster and I have an issue with loading. as following the error message. how can I solve this issue?

issueLoading1.PNG 

issueLoading2.PNG

Xin Qiu

unread,
Dec 9, 2021, 8:21:20 PM12/9/21
to User Group for BigDL and Analytics Zoo
This load_torch is for lua version Torch(https://github.com/torch/nn), not PyTorch.
To use a pretrained pytorch model for inference, you can use our nightly-build bigdl via "pip install bigdl-orca==0.14.0b20211209", and follow this guide https://bigdl.readthedocs.io/en/latest/doc/Orca/Overview/distributed-training-inference.html#pytorch-estimator 
BTW, we are mering our analytics-zoo and BigDL into BigDL's repo, so it's much better to use new BigDL >= 0.14.0.

Mohammed Elhmadany

unread,
Jan 4, 2022, 9:08:32 AM1/4/22
to User Group for BigDL and Analytics Zoo
Hi Xin Qiu
thanks for your reply and sorry for my delayed feedback,

I tried using the bigdl-orca package to use a pre-trained PyTorch model for inference but still, I am stuck  in loading the model:
and my method I tried as following for your review and I applied that on Colab and my local machine for both python versions 3.6 and 3.7 and there error related to JEP package as I think but I do not know what the specific case  and I used this steps as reference :

https://bigdl.readthedocs.io/en/latest/doc/Orca/QuickStart/orca-pytorch-quickstart.html

best regards



Xin Qiu

unread,
Jan 4, 2022, 9:19:03 AM1/4/22
to User Group for BigDL and Analytics Zoo

Xin Qiu

unread,
Jan 4, 2022, 9:42:03 PM1/4/22
to User Group for BigDL and Analytics Zoo
Colab need a different Environment Preparation from normal linux system. You can use the Environment Preparation part in our colab notebook.
https://colab.research.google.com/github/intel-analytics/BigDL/blob/branch-2.0/python/orca/colab-notebook/quickstart/pytorch_lenet_mnist.ipynb


在2022年1月4日星期二 UTC+8 22:08:32<elhm...@gmail.com> 写道:
Reply all
Reply to author
Forward
0 new messages