当前位置:网站首页>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
边栏推荐
- Global and Chinese market of network connected IC card smart water meters 2022-2028: Research Report on technology, participants, trends, market size and share
- Game 280 of leetcode week
- [FPGA tutorial case 10] design and implementation of complex multiplier based on Verilog
- [wave modeling 3] three dimensional random real wave modeling and wave generator modeling matlab simulation
- 107. Some details of SAP ui5 overflow toolbar container control and resize event processing
- Playwright recording
- Introduction to the gtid mode of MySQL master-slave replication
- [pure tone hearing test] pure tone hearing test system based on MATLAB
- Database postragesql client authentication
- C basic knowledge review (Part 3 of 4)
猜你喜欢
微信小程序:全网独家小程序版本独立微信社群人脉
小程序直播 + 电商,想做新零售电商就用它吧!
Pandora IOT development board learning (RT thread) - Experiment 4 buzzer + motor experiment [key external interrupt] (learning notes)
LeetCode周赛 + AcWing周赛(T4/T3)分析对比
JS implementation determines whether the point is within the polygon range
Take you ten days to easily complete the go micro service series (IX. link tracking)
小程序容器技术与物联网 IoT 可以碰撞出什么样的火花
Applet live + e-commerce, if you want to be a new retail e-commerce, use it!
SAP ui5 application development tutorial 106 - how to improve the readability of SAP ui5 application routing URL trial version
整理混乱的头文件,我用include what you use
随机推荐
142. Circular linked list II
Discrete mathematics: propositional symbolization of predicate logic
大专学历,33岁宝妈又怎样?我照样销售转测试,月入13k+
Wechat applet: Xingxiu UI v1.5 WordPress system information resources blog download applet wechat QQ dual end source code support WordPress secondary classification loading animation optimization
Introduction to the gtid mode of MySQL master-slave replication
Global and Chinese markets of radiation linear accelerators 2022-2028: Research Report on technology, participants, trends, market size and share
BGP comprehensive experiment
Delaying wages to force people to leave, and the layoffs of small Internet companies are a little too much!
POAP:NFT的采用入口?
Redis master-slave replication cluster and recovery ideas for abnormal data loss # yyds dry goods inventory #
Arbitrum:二维费用
Wechat applet: exclusive applet version of the whole network, independent wechat community contacts
es使用collapseBuilder去重和只返回某个字段
When the industrial Internet era is truly developed and improved, it will witness the birth of giants in every scene
Pycharm professional download and installation tutorial
微信小程序;胡言乱语生成器
node工程中package.json文件作用是什么?里面的^尖括号和~波浪号是什么意思?
Global and Chinese market of optical densitometers 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets for industrial X-ray testing equipment 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of network connected IC card smart water meters 2022-2028: Research Report on technology, participants, trends, market size and share