
Code
文章平均质量分 60
Vincy_King
所有人都祝你快乐,我只愿你遍历山河,觉得人间值得。
展开
-
Transformers Roberta如何添加tokens
用tansformers roberta模型添加special tokens原创 2022-06-21 09:36:35 · 988 阅读 · 1 评论 -
【Chinese Coreference resolution】StanfordNLP代码实现
最近在做一个角色识别的项目,项目中需要用到共指消解的方法,大体了解的有四种:基于Spenbert(https://github.com/troublemaker-r/Chinese_Coreference_Resolution/blob/2b88450eeb3da248fb0f6365c38a32b9fffcb962/README.md)基于问答系统的Span prediction(https://github.com/ShannonAI/CorefQA)参考Emory NLP的工作,他们也是做角色原创 2022-04-26 21:02:07 · 1413 阅读 · 4 评论 -
【Knowledge Distillation】Concept and Code
关于知识蒸馏的概念和代码原创 2022-01-06 15:52:57 · 858 阅读 · 0 评论 -
【动手学深度学习】线性回归 + 基础优化算法
1. 线性回归2. 基础优化算法3. 线性回归的从零开始实现import randomimport torchfrom d2l import torch as d2l# 构造人造数据集def synthetic_data(w,b,num_examples): """生成 y=Xw+b+噪声""" X=torch.normal(0,1,(num_examples,len(w))) y=torch.matmul(X,w)+b y+=torch.normal(0,0原创 2022-01-05 22:50:11 · 715 阅读 · 0 评论 -
prompt 代码示例
1. 定义任务from openprompt.data_utils import InputExampleclasses=[ 'negative', 'positive']dataset=[ InputExample( guid = 0, text_a = "Albert Einstein was one of the greatest intellects of his time.", ), InputExample(原创 2022-01-05 22:32:19 · 1813 阅读 · 0 评论