自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(88)
  • 收藏
  • 关注

原创 COME2023

接下来,我们为每个OCR文本提出了主对象的概念,并用它来净化面向OCR的场景图。通过探索每个OCR令牌的主对象,我们在主对象的基础上构建了一个纯化的场景图,然后通过图卷积网络(GCN)丰富了视觉嵌入。文本图像字幕旨在理解图像中的场景文本,以生成图像字幕。由于场景文本的视觉和文本特征具有双重模态,准确表达OCR标记的多模态语义特征是一项具有挑战性的任务。此外,由于场景文本不能独立于特定对象而存在,并且总是与其周围环境相关联,因此建立以OCR标记为中心的场景图也是理解其与图像中其他对象关系的重要方法。

2023-08-16 08:04:05 180 3

原创 AzCopy cannot list files due to reason read tcp [ip]->[ip]: read: connection reset by peer

【代码】AzCopy cannot list files due to reason read tcp [ip]->[ip]: read: connection reset by peer。

2023-07-30 09:57:18 118

原创 硬盘被程序使用

【代码】硬盘被程序使用。

2023-07-09 22:56:15 296

原创 【azcopy】

【代码】【azcopy】

2023-07-09 22:31:53 175

转载 经典检索算法:BM25原理

经典检索算法:BM25原理

2021-06-02 09:32:19 300

转载 Seaborn库热力图使用进阶

Seaborn库热力图使用进阶

2021-05-20 16:05:14 221

原创 模型ensemble

HUMAN ENSEMBLE LEARNINGBagging, boosting and stacking in machine learningEnsemblesNeural Networks and Ensemble LearningEnsembling neural networks: Many could be better than allkaggle-ensembling-guide

2021-04-21 10:29:41 299

转载 梯度累加

梯度累加

2021-04-15 09:25:58 210

原创 读取official_dev的mdb文件

>>> import lmdb>>> import msgpack>>> from lz4.frame import compress, decompress>>> env = lmdb.open(db_dir, readonly=True,create=False,lock=False,readahead=True)>>> txn = env.begin(buffers=True)>>>

2021-03-30 16:15:50 191

转载 python读写LMDB文件的方法

python读写LMDB文件的方法

2021-03-30 15:48:28 126

原创 lmdb.open的参数

lmdb.open的参数readahead`readahead`: If ``False``, LMDB will disable the OS filesystem readahead mechanism, which may improve random read performance when a database is larger than RAM.create`create`: If ``

2021-03-29 20:55:10 2649 1

原创 torch.gather

官网解释torch.gather(input, dim, index, *, sparse_grad=False, out=None) → TensorParameters:input (Tensor) – the source tensordim (int) – the axis along which to indexindex (LongTensor) – the indices of elements to gather例子>>> t = torch.Tensor(

2021-03-08 18:10:50 93

原创 python len()

返回的是张量的行>>> c = torch.rand(87654,3)>>> print(len(c))87654

2021-02-02 12:54:14 540

原创 baseline

>>> batch_size = 3>>> sequence_length = 6>>> token_type_ids=torch.zeros(batch_size,sequence_length)>>> attention_mask=torch.zeros(batch_size,sequence_length)>>> input_ids = torch.zeros(batch_size,sequence_le

2021-01-27 19:47:15 106

原创 Bert 输出及例子

from transformers import AutoTokenizer, AutoModeltokenizer = AutoTokenizer.from_pretrained("bert-base-chinese")Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 624/624 [00:00&lt

2021-01-27 14:36:10 3419

原创 Python click模块

官方文档博客:Python——click模块Python Click 学习笔记python 第三方模块click 的使用

2021-01-14 13:02:45 222

原创 ubuntu16.04 安装horovod

1.下载安装nccl1.1 下载仓库安装包后sudo dpkg -i /home/chen/mydisk/YJY/nccl-repo-ubuntu1604-2.8.3-ga-cuda10.1_1-1_amd64.deb1.2 更新: sudo apt update1.3 安装ncclsudo apt install libnccl2=2.8.3-1+cuda10.1 libnccl-dev=2.8.3-1+cuda10.11.4 测试nccl是否安装好git clone https://gi

2021-01-02 10:01:01 424

转载 Ubuntu16.04 安装指定版本docker ce

卸载之前的旧版本 sudo apt-get remove docker docker-engine docker-ce docker.io更新apt包索引sudo apt-get update安装以下包以使apt可以通过HTTPS使用存储库(repository) sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common添加Docker官方的GPG密钥curl -f

2021-01-02 09:40:48 1602

转载 ConceptNet

https://blog.csdn.net/itnerd/article/details/103478224

2020-12-30 10:59:16 416

转载 Python find()

语法str.find(str, beg=0, end=len(string))描述Python find() 方法检测字符串中是否包含子字符串 str ,如果指定 beg(开始) 和 end(结束) 范围,则检查是否包含在指定范围内,如果包含子字符串返回开始的索引值,否则返回-1。参数str -- 指定检索的字符串beg -- 开始索引,默认为0。end -- 结束索引,默认为字符串的长度。返回值如果包含子字符串返回开始的索引值,否则返回-1。...

2020-12-27 16:39:53 75 1

原创 hugging-face Transformer squad.py

squad.pySQuAD数据集格式processors/squad.py_improve_answer_spanSQuAD数据集格式{'title': 'Beyoncé', 'paragraphs': [ {'qas': [{'question': 'When did Beyonce start becoming popular?', 'id': '56be85543aeaaa14008c9063', 'answers': [{'text': '

2020-12-24 15:07:16 310

转载 Python bytes类型及用法

Python bytes类型及用法

2020-12-24 09:33:02 380

原创 modeling_bert.py

model_bert.pyBertEmbeddings类token embeddingssegment embeddingsposition embeddingsBertSelfAttention类三级目录BertEmbeddings类pytorch中nn.Embedding原理及使用https://www.jianshu.com/p/63e7acc5e890token embeddingsdef __init__(self, config): super().__init__()

2020-11-12 14:43:24 360 1

转载 为什么BERT有3个嵌入层,它们都是如何实现的

https://www.cnblogs.com/d0main/p/10447853.html

2020-11-11 23:14:30 197

原创 hugging-face Transformer tokenization_bert.py

函数load_vocabdef load_vocab(vocab_file): """Loads a vocabulary file into a dictionary.""" """把词汇表加载为一个有序字典""" vocab = collections.OrderedDict() # 有序字典 with open(vocab_file, "r", encoding="utf-8") as reader: tokens = reader.readli

2020-10-30 14:40:38 2554 1

转载 @property 使用方法

一https://www.cnblogs.com/taysem/p/12156375.html@property 下方的函数只能是self参数 ,不能有其他的参数property 常和私有属性相结合使用1.setter 修改修改@property 下的属性值 借助 函数名称.setter 修改2.deleter 删除通过删除property属性来删除私有属性二https://zhuanlan.zhihu.com/p/64487092class DataSet(object):

2020-10-29 21:58:49 407

转载 Python is instance

描述isinstance(object, classinfo)参数object – 实例对象。classinfo – 可以是直接或间接类名、基本类型或者由它们组成的元组。返回值如果对象的类型与参数二的类型(classinfo)相同则返回 True,否则返回 False。>>>a = 2>>> isinstance (a,int)True>>> isinstance (a,str)False>>> isinsta

2020-10-26 10:56:49 221

转载 Pytorch parameter与buffer

Pytorch parameter与buffer模型保存Parameter和bufferParameterbuffer转载自知乎原文链接:https://zhuanlan.zhihu.com/p/89442276模型保存在 Pytorch 中一种模型保存和加载的方式如下:# savetorch.save(model.state_dict(), PATH)# loadmodel = MyModel(*args, **kwargs)model.load_state_dict(torch.lo

2020-10-23 15:22:57 305

原创 Pytorch torch.range()&torch.arange()

torch.range(start=1, end=6) 的结果是会包含end的,创建的tensor的类型为float32。torch.arange(start=1, end=6)的结果并不包含end,创建的tensor的类型为int64。>>> y=torch.range(1,6)>>> ytensor([1., 2., 3., 4., 5., 6.])>>> y.dtypetorch.float32>>> z=torc

2020-10-23 09:10:42 6058

转载 Pytorcg torch.triu

torch.triu(input, diagonal=0, out=None)torch.triu(input, diagonal=0, out=None) → Tensor返回矩阵上三角部分,其余部分定义为0。Parameters:input (Tensor) – the input tensordiagonal (int, optional) – the diagonal to considerout (Tensor, optional) – the output tensor如果dia

2020-10-22 15:53:45 348

转载 Pytorch repeat

repeat(*sizes)repeat 相当于一个broadcasting的机制沿着指定的维度重复tensor。不同与expand(),本函数复制的是tensor中的数据。import torchimport torch.nn.functional as Fimport numpy as npa = torch.Tensor(128,1,512)B = a.repeat(1,5,1)print(B.shape)torch.Size([128, 5, 512])...

2020-10-22 15:42:36 84

转载 Pytorch .masked_fill_()

masked_fill_(mask, value)掩码操作用value填充tensor中与mask中值为1位置相对应的元素。mask的形状必须与要填充的tensor形状一致。a = torch.randn(5,6)x = [5,4,3,2,1]mask = torch.zeros(5,6,dtype=torch.float)for e_id, src_len in enumerate(x): mask[e_id, src_len:] = 1mask = mask.to(device

2020-10-22 15:15:24 718

原创 Macbook PS快捷键

01快速放大缩小:option+鼠标滚轮更换画板的背景颜色:拾色器选好颜色 工具选为油漆桶 按住shift 在背景处点击02图像大小:option+command+I 整个画板同时变化。放大作品,等比例放大画布大小:option+command+c 画板上的图像大小不跟着变化。不影响作品。裁剪工具约等于画布大小。打开文件:command+o03给新建的图层命名:option+右下角新建图层图像适合屏幕:command+0放大/缩小:command++或command±移动工具:移动的是

2020-10-17 22:39:57 4257

原创 Macbook 常用命令

1、删除.DS_Store文件夹sudo find / -name ".DS_Store" -depth -exec rm {} \;

2020-10-17 22:30:51 173

原创 概率、Odds、Logit

概率概率(Probability)描述的是某事件A出现的次数与所有结果出现的次数之比,公式为:P(A)=(Number of Events A)/(Total Number of Events)OddsOdds是指事件发生的概率与不发生的概率之比。公式为:Odds=(Probability of event)/(Probability of no event)=P/(1-P)LogitLogit 就 是 Log of odds...

2020-10-14 23:00:50 2476

转载 显著性检验

https://www.cnblogs.com/hdu-zsk/p/6293721.html

2020-10-14 21:50:43 138

原创 《笨》练习 15阅读文件、16读写文件

15 阅读文件from sys import argvscript, filename = argvtxt = open(filename)print(f"Here's your file {filename}:")print(txt.read())print("Type the filename again:")file_again = input(">")txt_again = open(file_again)print(txt_again.read())take

2020-10-06 21:38:34 90

原创 《笨》练习11、12、13、14

11 问问题>>> print("How old are you?")How old are you?>>> 66>>> print("How old are you?", end=' ')How old are you? >>> 55在每打印行末尾放一个 end=’ ’ ,是为了告诉 print 不要另起一行。input的使用方法1print("How old are you?", end=' ')age =

2020-10-05 10:50:55 77

原创 《笨》练习10

\ 这个字符可以把没法输入的字符转化成字符串。一个很重要的转义字符就是转义单引号或者双引号。第二种方法是用三个双引号,即 “”" ,这样就能像字符串一样运行,而且你可以多输入几行, 最后再以 “”" 结尾即可。# print("I am 6'2\" tall.")# print('I am 6\'2" tall.')tabby_cat = "\tI'm tabbed in." # \t : Tabpersian_cat = "I'm split\non a line."backslash_

2020-10-04 21:32:14 82

原创 《笨》练习5、6、7

5 更多变量和打印字符串前面加上字母 f (代表 format), 比如 f"Hello, {somevar}" 。双引号前面的 f 是为了告诉 python3: “这个字符串需要被格式化,把这些变量放在那儿。”my_name = 'Zed A. Shaw'my_age = 35 # not a liemy_height = 74 # inchesmy_weight = 180 # lbsmy_eyes = 'Blue'my_teeth = 'White'my_hair = 'Brown'

2020-10-04 21:08:01 122

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除