我遇到了RunTimeError一段时间试图在我机器的 CPU 而不是 GPU 中运行代码的情况。代码最初来自这个 GitHub 项目 - IBD: Interpretable Basis Decomposition for Visual Explanation。这是一个研究项目。我尝试将 CUDA 作为false并查看此网站上的其他解决方案。
GPU = False # running on GPU is highly suggested
CLEAN = False # set to "True" if you want to clean the temporary large files after generating result
APP = "classification" # Do not change! mode choide: "classification", "imagecap", "vqa". Currently "imagecap" and "vqa" are not supported.
CATAGORIES = ["object", "part"] # Do not change! concept categories …Run Code Online (Sandbox Code Playgroud) python machine-learning computer-vision python-2.7 python-3.x