训练时没有问题,但在跑测试集的过程中出现警告:
[W CudaIPCTypes.cpp:92] Producer process tried to deallocate over 1000 memory blocks referred by consumer processes. Deallocation might be significantly slowed down. We assume it will never going to be the case, but if it is, please file but to https://github.com/pytorch/pytorch00:35<28:37, 1.93s/it]
改代码的过程中更改了episode中的states列表内容(tensor数据类型),导致最后保存时states内容不是json支持直接序列化的对象,出现报错。
解决办法:将两个state变量名区别开,分开保存。
Connection to Python debugger failed Socket closed问题
程序无法运行,也无法调试。
原因是文件名与文件中调用的包、函数等相同,更改文件名即可解决。