工具代码
bj小蚂蚁
这个作者很懒,什么都没留下…
展开
-
等概率生成随机数
import random import time def generate_random(size): start_time = time.time() random_data = [] for i in range(size): random_data.append(0) # print(random_data) # print(len(random_data)) count = len(random_data)// 3 co.原创 2021-11-26 15:27:02 · 210 阅读 · 0 评论 -
resnet-50,resnet-101,resnet-152代码
import torch.nn as nn import torch import math import torch.utils.model_zoo as model_zoo __all__ = ['ResNet', 'resnet50', 'resnet101', 'resnet152'] model_urls = { 'resnet50': 'https://download.pytorch.org/models/resnet50-19c8e357.pth', 'resnet10.原创 2021-06-10 17:38:58 · 2911 阅读 · 0 评论