Python Error: RuntimeError: [enforce fail at inline_container.cc:106] . archive does not contain any files

6 ビュー (過去 30 日間)
Song Wang
Song Wang 2022 年 4 月 12 日
回答済み: Ashkan Pakzad 2022 年 6 月 13 日
When executing the following code, I encountered the error.
torch = py.importlib.import_module('torch');
a = torch.tensor([1, 2, 3, 4])
torch.save(a, 'a.pth')
torch.load('a.pth')
Error using serialization>__init__
Python Error: RuntimeError: [enforce fail at inline_container.cc:106] . archive does not contain any files
Error in serialization>load (line 705)
OS: linux ubuntu 18.04
MATLAB version: R2022a
Torch version: 1.11.0
The weird thing is that I can run it on windows, but on linux it fails.

回答 (1 件)

Ashkan Pakzad
Ashkan Pakzad 2022 年 6 月 13 日
I had this problem too with pytorch 1.11 I tried using pytorch 1.10 as I didn't have this problem with my other PC using 1.10 and it worked! I don't know the inner workings or potential patches and updates between the two to detail the exact problem.

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by