Expected: /home/lyd/.pycharm_helpers/pydev/pydevd_attach_to_process/attach_linux_amd64.so to exist.
时间: 2023-12-19 08:06:45 浏览: 85
This error message is related to the PyCharm debugger tool and indicates that the file "attach_linux_amd64.so" is missing from the specified directory. This file is a shared object library that is used by the PyCharm debugger to attach to a running process on a Linux system.
To resolve this error, you can try reinstalling PyCharm to ensure that all necessary files are installed correctly. If the issue persists, you may need to manually copy the missing file to the specified directory or check if there is a permission issue preventing PyCharm from accessing the file.
相关问题
Traceback (most recent call last): File "D:\Pycharm\PyCharm 2020.2.5\plugins\python\helpers\pydev\pydevd.py", line 1448, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "D:\Pycharm\PyCharm 2020.2.5\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "C:/Users/wz/Desktop/Framework to practice/多尺度Demo/model.py", line 177, in <module> summary(net, (3, 224, 224)) File "D:\anaconda3\envs\pytorch\lib\site-packages\torchsummary\torchsummary.py", line 72, in summary model(*x) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "C:/Users/wz/Desktop/Framework to practice/多尺度Demo/model.py", line 134, in forward x = self.MSB3a(x) File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1148, in _call_impl result = forward_call(*input, **kwargs) File "C:/Users/wz/Desktop/Framework to practice/多尺度Demo/model.py", line 63, in forward return torch.cat(outputs,1) TypeError: expected Tensor as element 3 in argument 0, but got Sequential
这个错误是由于在代码的最后一行,尝试将输出结果进行拼接时,其中包含一个`nn.Sequential`对象。而torch.cat()函数要求参数是Tensor类型,而不是`nn.Sequential`对象。
要解决这个问题,你需要修改代码的最后一行,将`branch4 = self.branch4`改为`branch4 = self.branch4(x)`。这样就可以将输入x通过最大池化层和1x1的卷积层操作得到一个Tensor类型的结果。
然后再进行拼接操作时,就不会出现类型错误了。这样你就可以获得四个分支的输出结果,并将它们拼接成一个Tensor类型的结果并返回了。
阅读全文