复现数据增强实验(1)--Contextual Augmentation: Data Augmentation by Words with Paradigmatic Relations

最开始知道题目中的论文,是看到BERT做数据增强的论文,Conditional BERT Contextual Augmentation,看到有同学分析的文章(见https://zhuanlan.zhihu.com/p/53141568),文章中提到了Kobayashi的这篇论文,刚好有开源的代码,作为英专毕业数年的不合格程序媛,自己写代码是不现实的,决定用开源的代码复现一下实验结果,记录以下作为参考。

原代码在Github上的地址:<https://github.com/pfnet-research/contextual_augmentation>

按照readme中的顺序,从上到下依次执行命令:

1. Prepare a label-conditional bi-directional language model

(1) # download wikitext

sh prepare_rawwikitext.sh

(2) # install chainer and spacy

命令:pip install cupy--->>  pip install cupy-cuda90

提示:

Collecting cupy-cuda90

  Downloading https://files.pythonhosted.org/packages/30/a5/89d64c99a8b17c1ed64fcc0c9207ff6bc70efe90a9c567d616eb910aee34/cupy_cuda90-6.2.0-cp36-cp36m-manylinux1_x86_64.whl (270.4MB)

     |████████████████████████████████| 270.4MB 17kB/s

Collecting fastrlock>=0.3 (from cupy-cuda90)

  Downloading https://files.pythonhosted.org/packages/b5/93/a7efbd39eac46c137500b37570c31dedc2d31a8ff4949fcb90bda5bc5f16/fastrlock-0.4-cp36-cp36m-manylinux1_x86_64.whl

Requirement already satisfied: numpy>=1.9.0 in /dnn4_added/wanglina/wln_install/python-3.6/lib/python3.6/site-packages (from cupy-cuda90) (1.16.4)

Requirement already satisfied: six>=1.9.0 in /dnn4_added/wanglina/wln_install/python-3.6/lib/python3.6/site-packages (from cupy-cuda90) (1.12.0)

Installing collected packages: fastrlock, cupy-cuda90

Successfully installed cupy-cuda90-6.2.0 fastrlock-0.4

命令:pip install chainer

提示:

Collecting chainer

  Downloading https://files.pythonhosted.org/packages/2c/5a/86c50a0119a560a39d782c4cdd9b72927c090cc2e3f70336e01b19a5f97a/chainer-6.2.0.tar.gz (873kB)

     |████████████████████████████████| 880kB 174kB/s

Requirement already satisfied: setuptools in /dnn4_added/wanglina/wln_install/python-3.6/lib/python3.6/site-packages (from chainer) (28.8.0)

Collecting typing<=3.6.6 (from chainer)

  Downloading https://files.pythonhosted.org/packages/4a/bd/eee1157fc2d8514970b345d69cb9975dcd1e42cd7e61146ed841f6e68309/typing-3.6.6-py3-none-any.whl

Collecting typing_extensions<=3.6.6 (from chainer)

  Downloading https://files.pythonhosted.org/packages/62/4f/392a1fa2873e646f5990eb6f956e662d8a235ab4

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值