pytorch
文章平均质量分 80
彩虹宇
这个作者很懒,什么都没留下…
展开
-
使用torch.autograd.function解决dist.all_gather不能反向传播问题
最近在用mmcv复现Partial FC模型,看到源码中,有单独写的前向反向传播,甚是疑惑~源码: # Features all-gathertotal_features = torch.zeros(features.size()[0] * cfg.world_size, cfg.embedding_size, device=local_rank)dist.all_gather(lis原创 2021-06-30 16:13:06 · 1796 阅读 · 1 评论 -
mmcv优化器参数
1. train_parameters# build model model = builder.build_classifier(cfg.model) logger.info(model) if global_rank == 0: for param in model.train_parameters(): # 第0层: list; 第一层: 字典 logger.info(param.keys()) # tra原创 2020-12-31 16:52:21 · 879 阅读 · 1 评论