Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前,我正在使用仅支持 CPU 构建的 PyTorch。当我运行推理时,该输入文件的信息以某种方式存储在缓存中,并且内存不断增加用于推理的每个新的唯一文件。另一方面,如果我一次又一次地使用同一个文件,内存使用量不会增加。
仅在 CPU 的情况下,有没有办法像 cuda.empty_cache() 一样清除缓存。