当前位置:网站首页>batchnorm.py这个文件单GPU运行报错解决
batchnorm.py这个文件单GPU运行报错解决
2022-07-05 01:24:00 【子燕若水】
原始的
if self.training and self.track_running_stats:
self.num_batches_tracked = self.num_batches_tracked + 1
if self.momentum is None: # use cumulative moving average
exponential_average_factor = 1.0 / self.num_batches_tracked.item()
else: # use exponential moving average
exponential_average_factor = self.momentum
need_sync = self.training or not self.track_running_stats
if need_sync:
process_group = torch.distributed.group.WORLD
if self.process_group:
process_group = self.process_group
world_size = torch.distributed.get_world_size(process_group)
need_sync = world_size > 1修改文件:/home/ubuntu/venvs/venv/lib/python3.6/site-packages/torch/nn/modules/batchnorm.py
(venv) [email protected]:~/code/ICDAR2021_MFD$ python tools/train.py configs/gfl/gfl_s50_fpn_2x_coco.py --gpus 1 --work-dir /home/ubuntu/data
Traceback (most recent call last):
File "tools/train.py", line 8, in <module>
import mmcv
File "/home/ubuntu/venvs/venv/lib/python3.6/site-packages/mmcv/__init__.py", line 4, in <module>
from .fileio import *
File "/home/ubuntu/venvs/venv/lib/python3.6/site-packages/mmcv/fileio/__init__.py", line 4, in <module>
from .io import dump, load, register_handler
File "/home/ubuntu/venvs/venv/lib/python3.6/site-packages/mmcv/fileio/io.py", line 4, in <module>
from ..utils import is_list_of, is_str
File "/home/ubuntu/venvs/venv/lib/python3.6/site-packages/mmcv/utils/__init__.py", line 19, in <module>
import torch
File "/home/ubuntu/venvs/venv/lib/python3.6/site-packages/torch/__init__.py", line 448, in <module>
from .functional import *
File "/home/ubuntu/venvs/venv/lib/python3.6/site-packages/torch/functional.py", line 4, in <module>
import torch.nn.functional as F
File "/home/ubuntu/venvs/venv/lib/python3.6/site-packages/torch/nn/__init__.py", line 1, in <module>
from .modules import *
File "/home/ubuntu/venvs/venv/lib/python3.6/site-packages/torch/nn/modules/__init__.py", line 17, in <module>
from .batchnorm import BatchNorm1d, BatchNorm2d, BatchNorm3d, SyncBatchNorm
File "/home/ubuntu/venvs/venv/lib/python3.6/site-packages/torch/nn/modules/batchnorm.py", line 489
need_sync = False
边栏推荐
- A simple SSO unified login design
- Talking about JVM 4: class loading mechanism
- Global and Chinese markets for industrial X-ray testing equipment 2022-2028: Research Report on technology, participants, trends, market size and share
- 当产业互联网时代真正发展完善之后,将会在每一个场景见证巨头的诞生
- Playwright之录制
- Digital DP template
- Grabbing and sorting out external articles -- status bar [4]
- [wave modeling 3] three dimensional random real wave modeling and wave generator modeling matlab simulation
- 【海浪建模1】海浪建模的理论分析和matlab仿真
- 19. Delete the penultimate node of the linked list
猜你喜欢

Basic operations of database and table ----- delete index
![Yyds dry goods inventory [Gan Di's one week summary: the most complete and detailed in the whole network]; detailed explanation of MySQL index data structure and index optimization; remember collectio](/img/e8/de158982788fc5bc42f842b07ff9a8.jpg)
Yyds dry goods inventory [Gan Di's one week summary: the most complete and detailed in the whole network]; detailed explanation of MySQL index data structure and index optimization; remember collectio

小程序直播 + 电商,想做新零售电商就用它吧!

大专学历,33岁宝妈又怎样?我照样销售转测试,月入13k+

小程序容器技术与物联网 IoT 可以碰撞出什么样的火花

潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
![[wave modeling 2] three dimensional wave modeling and wave generator modeling matlab simulation](/img/50/b6cecc95e46fe1e445eb00ca415669.png)
[wave modeling 2] three dimensional wave modeling and wave generator modeling matlab simulation

【大型电商项目开发】性能压测-优化-中间件对性能的影响-40

资深测试/开发程序员写下无bug?资历(枷锁)不要惧怕错误......

实战模拟│JWT 登录认证
随机推荐
Implementation steps of master detail detail layout mode of SAP ui5 application
小程序直播 + 电商,想做新零售电商就用它吧!
無心劍英譯席慕容《無怨的青春》
Behind the cluster listing, to what extent is the Chinese restaurant chain "rolled"?
Playwright之录制
How to safely eat apples on the edge of a cliff? Deepmind & openai gives the answer of 3D security reinforcement learning
Pycharm professional download and installation tutorial
A simple SSO unified login design
增量备份 ?db full
Game 280 of leetcode week
微信小程序:星宿UI V1.5 wordpress系统资讯资源博客下载小程序微信QQ双端源码支持wordpress二级分类 加载动画优化
ROS command line tool
How to use words to describe breaking change in Spartacus UI of SAP e-commerce cloud
Expose testing outsourcing companies. You may have heard such a voice about outsourcing
Discrete mathematics: Main Normal Form (main disjunctive normal form, main conjunctive normal form)
Inventory of more than 17 typical security incidents in January 2022
【FPGA教程案例10】基于Verilog的复数乘法器设计与实现
实战模拟│JWT 登录认证
如果消费互联网比喻成「湖泊」的话,产业互联网则是广阔的「海洋」
Database postragesql client connection default