码迷,mamicode.com
首页 >  
搜索关键字:self    ( 14215个结果
AverageMeter一个用来记录和更新变量的工具
之前使用过很多次,也没有做很好的记录,这次记录下来。AverageMeter可以记录当前的输出,累加到某个变量之中,然后根据需要可以打印出历史上的平均 这个class是一种常用的工具 该class内容如下 class AverageMeter(object): def __init__(self): ...
分类:其他好文   时间:2020-12-18 12:46:14    阅读次数:3
命名实体识别之动态融合不同bert层的特征(基于tensorflow)
num_labels = self.config.relation_num bert_config_file = self.config.bert_config_file bert_config = BertConfig.from_json_file(bert_config_file) model ...
分类:其他好文   时间:2020-12-18 12:37:56    阅读次数:2
__call__
# __author: "ZXYang"# date: 2020/12/13class MyTest(): def __call__(self, *args, **kwargs): print("__call__方法")m = MyTest()m()# __call__方法: m()可直接 【加() ...
分类:其他好文   时间:2020-12-18 12:30:38    阅读次数:2
jenkins与自动发布接口
1.安装 需先下载java环境 # 拉取库的配置到本地对应文件 0、wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo 1、wget https://pkg.jenkins.io/re ...
分类:其他好文   时间:2020-12-16 12:42:58    阅读次数:2
目标检测——yolov4预测及后处理
运用训练好的模型进行目标检测,模型输出为中心点对grid的偏移,长宽相对于anchor的缩放比例以及类别 其维度为(b, 13, 13, 3, classes+5) 1. 根据(x, y, h, w)计算出预测框相对于原图像的位置和大小 def yolo_correct_boxes(box_xy, ...
分类:其他好文   时间:2020-12-15 12:31:28    阅读次数:2
局部钩子和全局钩子
最先使用是在验证用户名和密码的时候 局部钩子的使用 需要在form中使用 全局钩子的使用 这是在校验注册页面的两次密码是否一致 def clean(self): password = self.cleaned_data.get('password', '') re_password = self.c ...
分类:其他好文   时间:2020-12-15 12:19:08    阅读次数:4
BOM操作
1.窗口操作 1.在当前窗口打开,可后退 HTML: <a href="url" target="_self"> JS: open("url","_self") 2.在当前窗口打开,禁止后退 JS: location.replace("新url") //用新url代替history中当前地址 3.在 ...
分类:其他好文   时间:2020-12-15 12:14:32    阅读次数:3
C均值聚类算法的Python实现
class pattern: x=0 y=0 def __init__(self,x,y): self.x=x self.y=y def dis(a,b): return ((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))**0.5 eps=0.00001 maxn= ...
分类:编程语言   时间:2020-12-14 12:59:58    阅读次数:4
LeetCode HOT 100
记录 ###I 通过:1, 错误:206(递归返回条件和边界条件), 1.两数之和-简单 class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: lookup = {} for i in range(l ...
分类:其他好文   时间:2020-12-14 12:59:21    阅读次数:3
py--多重继承
继承是面向对象编程的一个重要的方式,因为通过继承,子类就可以扩展父类的功能。 回忆一下Animal类层次的设计,假设我们要实现以下4种动物: ·Dog - 狗狗; ·Bat - 蝙蝠; ·Parrot - 鹦鹉; ·Ostrich - 鸵鸟。 如果按照哺乳动物和鸟类归类,我们可以设计出这样的类的层次 ...
分类:其他好文   时间:2020-12-14 12:56:40    阅读次数:3
14215条   上一页 1 ... 17 18 19 20 21 ... 1422 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!