PathPlanning icon indicating copy to clipboard operation
PathPlanning copied to clipboard

Using smbclient to load PyTorch model weights from a server, but I encountered some issues.

Open QingshuiL opened this issue 7 months ago • 0 comments

I tried using smbclient to load PyTorch model weights from a server, but I encountered some issues.

file_path = r"\\x.x.x.x\home\pytorch-models\resnet18-f37072fd.pth"
with smbclient.open_file(file_path, mode='rb', buffering=0) as fd:
    data = torch.load(fd, map_location=torch.device('cpu'))

The error

Exception has occurred: RuntimeError
PytorchStreamReader failed reading file data/140219036705280: file read failed

Is there any way I can load model weights?

QingshuiL avatar Nov 06 '23 10:11 QingshuiL