摘要:import torch import torch.nn as nn import torch.nn.functional as F import torchvision.datasets.mnist as mnist import torchvision.transforms as T impor
阅读全文
10 2022 档案
摘要:import torch import torch.nn as nn import numpy as np import torch.nn.functional as F class Model(nn.Module): def __init__(self): super().__init__() s
阅读全文
摘要:class BatchNormalization(Module): def __init__(self, in_feature, momentum=0.9, eps=1e-8): self.mu = 0 self.var = 1 self.momentum = momentum self.eps =
阅读全文
摘要:https://aistudio.baidu.com/aistudio/projectdetail/3391734?channelType=0&channel=0 直接通过https://aistudio.baidu.com/aistudio/projectoverview/public?kw=%2
阅读全文
摘要:launch.json { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configur
阅读全文
摘要:import cv2 dx0 = 0 dy0 = 0 isdown = False def callback(event, x, y, flags, userdata): global dx0,dy0,isdown color = 0, 255, 0 if flags & cv2.EVENT_FLA
阅读全文
摘要:class Dropout(Module): def __init__(self, prob_keep=0.5, inplace=True): super().__init__("Dropout") self.prob_keep = prob_keep self.inplace = inplace
阅读全文
摘要:import numpy as np import struct import random import matplotlib.pyplot as plt import pandas as pd import math class Dataset: def __init__(self, image
阅读全文
摘要:import random import struct import numpy as np import pandas as pd def load_labels(file): with open(file, "rb") as f: data = f.read() magic_number, nu
阅读全文
摘要:import numpy as np import struct import random import matplotlib.pyplot as plt import pandas as pd import math def load_labels(file): with open(file,
阅读全文
摘要:做数字识别3,假设10个类别 3求sigmoid如上图的10个值 我们把对应的位置作为ont-hot编码就可以了 做sigmoid
阅读全文
摘要:import numpy as np import matplotlib.pyplot as plt def sigmod(x): return 1/(1+np.exp(-x)) label = np.array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
阅读全文
摘要:import numpy as np import random x = np.array([0,1,2,3,4,5,6,7,8,9],dtype=np.float32) y = np.array([1.8,2.1,2.3,2.85,3.0,3.3,4.9,5.45,5.0,6.0]) k = ra
阅读全文
摘要:1.iou 两个框的交集重合 2.giou https://zhuanlan.zhihu.com/p/94799295?utm_source=wechat_session
阅读全文
摘要:可以做时间函数,计算函数的时间,日志系统,解决异常处理,flask注解等 一定要会 如果需要实现传入参数
阅读全文
摘要:def qsort(array): if len(array) <= 1: return array pivot=array.pop() leftarray = [i for i in array if i < pivot] rightarray = [i for i in array if i >
阅读全文