She*_*dil 6 python cuda ubuntu debugger pycharm
这个问题介于 Stackoverflow 和 Superuser 之间——至少在我看来,所以如果这是错误的地方(在你看来 ;)),请随时向我指出 SO。
如果我在我的 python 代码中放置一个断点,调试器就会停止。如果我想进入下一行,它会这样做。 除非它发生在枚举(数据加载器)之后。我可以在 enumerate(dataloader) 之后放置一个断点,调试器也会停止。但是,我不能一步。如果我在 enumerate(dataloader) 之前放置断点并跨过 enumerate 行,也会发生同样的情况。在 enumerate(..) 之后,它不适用于该行。
有趣的事实是,它直到最近才起作用 - 就像一周前
# Breakpoints work, stepping over works
...
for epoch in range(num_epochs):
for i, data in enumerate(dataloader, 0):
# If I break before this line and I step until the next, I can not step afterwards
netD.zero_grad()
# Breakpoints work, stepping does not
Run Code Online (Sandbox Code Playgroud)
到目前为止没有任何效果......我真的不想重新安装我的操作系统,这很可能会有所帮助,但是是的,出于明显的原因,这不是我想要的。有没有人经历过这种行为并且可以帮助我?提前致谢。请随时询问其他详细信息。我会尽量提供尽可能多的细节
我将列出我的设置的一些细节:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Apr_24_19:10:27_PDT_2019
Cuda compilation tools, release 10.1, V10.1.168
Run Code Online (Sandbox Code Playgroud)
Rom*_*ais 15
我几个星期都遇到同样的问题,只是设法解决了它!解决方案是在创建对象期间设置num_workers为。0DataLoader