call python script contains pytorch module
이전 댓글 표시
Hello,
I am calling a python script, which uses the pytorch module, but it generates error:
"Traceback (most recent call last):
File "/Users/zhengh3/Documents/MATLAB/afreg/kronecker_product.py", line 2, in <module>
import torch
ImportError: No module named torch"
I have tried to change the current pyversion to the path where I installed the pytorch. Is there anyway the matlab will recognize the torch.
Thank you so much!
Hanzhong
댓글 수: 1
peng xue
2020년 6월 7일
Hi, I have the same problem as you. Have you solved this problem now?
답변 (1개)
Vimal Rathod
2019년 10월 30일
0 개 추천
You can refer to the following link to get more understanding on calling python library functions:
Hope this helps!
카테고리
도움말 센터 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!