摘要: #!/usr/bin/python3 # _*_coding:utf-8 _*_ ''' 自定义重写 dataset,实现类别均衡,体现为 每个batch都可以按照自己设定得比例来采样,且支持多进程和分布式 ''' from check_pkgs import * import torch.dist 阅读全文
posted @ 2021-02-06 18:47 dangxusheng 阅读(2704) 评论(0) 推荐(0) 编辑
摘要: import torch import torch.nn as nn import torch.nn.functional as F class LSR(nn.Module): def __init__(self, n_classes=10, eps=0.1): super(LSR, self)._ 阅读全文
posted @ 2021-02-06 18:42 dangxusheng 阅读(1696) 评论(0) 推荐(0) 编辑
摘要: 参考博客:http://aiuai.cn/aifarm1340.htmlhttps://yangkky.github.io/2019/07/08/distributed-pytorch-tutorial.html pytorch里DataParallel 和 DistributedParallel 阅读全文
posted @ 2021-02-06 18:28 dangxusheng 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 不懂原理的同学请参考: https://blog.csdn.net/qq_43337858/article/details/102738352?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPa 阅读全文
posted @ 2021-02-06 17:55 dangxusheng 阅读(1292) 评论(0) 推荐(0) 编辑