Error loading: xxxx/plugins/python/helpers/pydev/pydevd_attach_to_process/attach_linux_amd64.so

在涉及到深度学习网络调试的时候,经常出现断点卡住的情况,还会提示:

Error loading: /home/xxx/pycharm-2023.2.1/plugins/python/helpers/pydev/pydevd_attach_to_process/attach_linux_amd64.so

程序能跑,就是卡在那里无法继续调试,对于观察变量很不方便,参照https://stackoverflow.com/questions/62341906/pytorch-dataloader-doesnt-work-with-remote-interpreter中的解决方法,将你当前调试的py文件中的num_workers参数删除:

# loader = torch.utils.data.DataLoader(dataset, batch_size=1, shuffle=False, num_workers=1)
loader = torch.utils.data.DataLoader(dataset, batch_size=1, shuffle=False)

这样就可以愉快的断点调试CNN咯。

你可能感兴趣的:(python,linux,开发语言)