C:\Users\80977\.conda\envs\pytorchenv\python.exe D:\work\DL-codes\deep-learning-for-image-processing-master\deep-learning-for-image-processing-master\pytorch_object_detection\faster_rcnn\train_mobilenetv2.py Using cuda device training. Using [0, 0.5, 0.6299605249474366, 0.7937005259840997, 1.0, 1.2599210498948732, 1.5874010519681994, 2.0, inf] as bins for aspect ratio quantization Count of instances per bin: [ 5 25 929 117 260 4198 135 48] Using 8 dataloader workers Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\80977\.conda\envs\pytorchenv\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "C:\Users\80977\.conda\envs\pytorchenv\lib\multiprocessing\spawn.py", line 125, in _main prepare(preparation_data) File "C:\Users\80977\.conda\envs\pytorchenv\lib\multiprocessing\spawn.py", line 236, in prepare _fixup_main_from_path(data['init_main_from_path']) File "C:\Users\80977\.conda\envs\pytorchenv\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path main_content = runpy.run_path(main_path, File "C:\Users\80977\.conda\envs\pytorchenv\lib\runpy.py", line 288, in run_path return _run_module_code(code, init_globals, run_name, File "C:\Users\80977\.conda\envs\pytorchenv\lib\runpy.py", line 97, in _run_module_code _run_code(code, mod_globals, init_globals, File "C:\Users\80977\.conda\envs\pytorchenv\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\work\DL-codes\deep-learning-for-image-processing-master\deep-learning-for-image-processing-master\pytorch_object_detection\faster_rcnn\train_mobilenetv2.py", line 4, in <module> import torch File "C:\Users\80977\AppData\Roaming\Python\Python39\site-packages\torch\__init__.py", line 123, in <module> raise err OSError: [WinError 1455] 页面文件太小,无法完成操作。 Error loading "C:\Users\80977\AppData\Roaming\Python\Python39\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll" or one of its dependencies.
时间: 2023-08-27 08:18:49 浏览: 257
这个错误提示是在运行 PyTorch 目标检测的 Faster R-CNN 模型时出现的。根据错误提示,似乎是在加载 `caffe2_detectron_ops_gpu.dll` 或其某个依赖项时出现了问题。
可能的原因和解决方法如下:
1. 内存不足:错误提示中提到“页面文件太小”,这可能是因为内存不足导致的。可以尝试关闭一些占用内存较多的程序或者增加内存。
2. 文件损坏:`caffe2_detectron_ops_gpu.dll` 文件或其某个依赖项可能被损坏了,需要重新安装 PyTorch。
3. 缺失依赖项:该文件可能依赖于其他一些文件,而这些文件可能缺失或损坏了。可以尝试重新安装 PyTorch 或者查找缺失的文件并手动安装。
4. 不兼容的操作系统:该文件可能不兼容当前操作系统。可以尝试更新操作系统或者查找适用于当前操作系统的版本。
希望以上方法能够帮助您解决问题。
相关问题
C:\Users\GW00321286\.conda\envs\python_39\python.exe E:\code-study\coda\test.py Traceback (most recent call last): File "E:\code-study\coda\test.py", line 13, in <module> c = gpd.GeoSeries(hits) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\geopandas\geoseries.py", line 208, in __init__ s = pd.Series(data, index=index, name=name, **kwargs) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\pandas\core\series.py", line 454, in __init__ data = com.maybe_iterable_to_list(data) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\pandas\core\common.py", line 308, in maybe_iterable_to_list return list(obj) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\shapely\prepared.py", line 32, in contains return self.context.contains(other) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\shapely\geometry\base.py", line 658, in contains return _maybe_unpack(shapely.contains(self, other)) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\shapely\decorators.py", line 77, in wrapped return func(*args, **kwargs) File "C:\Users\GW00321286\.conda\envs\python_39\lib\site-packages\shapely\predicates.py", line 540, in contains return lib.contains(a, b, **kwargs) TypeError: One of the arguments is of incorrect type. Please provide only Geometry objects.
根据你提供的信息,这是一个 Python 报错信息,其中指出了发生错误的位置在 test.py 文件的第 13 行。错误是由于在 GeoPandas 库的 GeoSeries 对象中传入了错误的参数类型导致的。具体来说,错误信息指出传入了一个非几何对象作为参数,而 GeoSeries 对象只能接受几何对象作为参数。建议检查代码,确保在 GeoSeries 对象中只传入几何对象。
Python path configuration: PYTHONHOME = (not set) PYTHONPATH = ‘C:\Users\lenovo\PycharmProjects\pythonProject’ program name = ‘C:\Users\lenovo.conda\envs\tensorflow_gpu\python.exe’ isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = ‘C:\Users\lenovo\.conda\envs\tensorflow_gpu\python.exe’ sys.base_prefix = ‘’ sys.base_exec_prefix = ‘’ sys.platlibdir = ‘lib’ sys.executable = ‘C:\Users\lenovo\.conda\envs\tensorflow_gpu\python.exe’ sys.prefix = ‘’ sys.exec_prefix = ‘’ sys.path = [ ‘C:\Users\lenovo\PycharmProjects\pythonProject’, ‘C:\Users\lenovo\.conda\envs\tensorflow_gpu\python39.zip’, ‘C:\Users\lenovo\.conda\envs\tensorflow_gpu’, ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named ‘encodings’ Current thread 0x00000950 (most recent call first): <no Python frame>
这段信息是Python环境配置方面的错误信息,其中最后一行出现了ModuleNotFoundError: No module named 'encodings',这是因为Python无法找到名为'encodings'的模块。建议您检查Python的安装和环境变量是否设置正确,或者重新安装Python。如果问题仍然存在,您可以尝试在Python安装目录中手动创建一个名为'encodings'的空文件夹,然后再次运行程序。
阅读全文