当前位置:   article > 正文

AI夏令营(第三期)NLP 任务二_you seem to have cloned a repository without havin

you seem to have cloned a repository without having git-lfs installed. pleas

在阿里云的机器学习平台PAI上跑的

机器学习PAI_机器学习建模训练部署_智能推荐_人工智能_阿里云 (aliyun.com)

获取预训练模型时出现问题(error:104 Connection reset by peer)所以修改部分代码

  • 前置依赖增加
  1. #import 相关库
  2. #导入前置依赖
  3. from transformers import BertTokenizer # 使用离线bert
  •  使用离线bert(需先下载)
  1. #获取Bert预训练模型
  2. # tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
  3. tokenizer = BertTokenizer.from_pretrained('./bert-base-uncased')

 下载bert

git clone https://huggingface.co/bert-base-uncased # 终端

使用时还会报错:OSError: You seem to have cloned a repository without having git-lfs installed. Please install git

  1. apt-get update
  2. apt-get install git-lfs
  3. git init
  4. git lfs install
  5. cd ./bert-base-uncased # 进入bert所在文件夹
  6. git lfs pull

重启一下环境就可以运行啦(当然如果刚进入就完成这些操作,也不用重启了)

  • 其他小问题:大概是baseline不小心打错了,在数据预处理时出现了未定义的“test”
  1. # test['Keywords'] = test['title'].fillna('')
  2. test_data['Keywords'] = test_data['title'].fillna('')

然后,就开始跑啦——

validation loss前期有低有高,后期一路升高,有待仔细研究

total随训练次数增加而降低,在epoch==90,step==167的时候,total loss就为0.0000了 

感觉努努力还可以再高点(flag)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/441326
推荐阅读
相关标签
  

闽ICP备14008679号