Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleHub
提交
68edc91d
P
PaddleHub
项目概览
PaddlePaddle
/
PaddleHub
1 年多 前同步成功
通知
283
Star
12117
Fork
2091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
200
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleHub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
200
Issue
200
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
68edc91d
编写于
8月 26, 2019
作者:
Z
zhangxuefei
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'release/v1.1.0' into develop
上级
20a9b9ac
f3370791
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
96 addition
and
228 deletion
+96
-228
AUTHORS.md
AUTHORS.md
+2
-0
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
+0
-76
CODE_OF_CONDUCT_cn.md
CODE_OF_CONDUCT_cn.md
+0
-50
README.md
README.md
+91
-94
demo/sequence-labeling/README.md
demo/sequence-labeling/README.md
+1
-1
demo/text-classification/text_classifier.py
demo/text-classification/text_classifier.py
+2
-7
未找到文件。
AUTHORS.md
浏览文件 @
68edc91d
...
...
@@ -2,4 +2,6 @@
|---|---|
| ZeyuChen | Zeyu Chen |
| nepeplwu | Zewu Wu |
| sjtubinlong | Bin Long |
| Steffy-zxf | Xuefei Zhang |
| kinghuin | Jinxuan Qiu |
CODE_OF_CONDUCT.md
已删除
100644 → 0
浏览文件 @
20a9b9ac
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
*
Using welcoming and inclusive language
*
Being respectful of differing viewpoints and experiences
*
Gracefully accepting constructive criticism
*
Focusing on what is best for the community
*
Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
*
The use of sexualized language or imagery and unwelcome sexual attention or
advances
*
Trolling, insulting/derogatory comments, and personal or political attacks
*
Public or private harassment
*
Publishing others' private information, such as a physical or electronic
address, without explicit permission
*
Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at paddle-dev@baidu.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the
[
Contributor Covenant
][
homepage
]
, version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[
homepage
]:
https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
CODE_OF_CONDUCT_cn.md
已删除
100644 → 0
浏览文件 @
20a9b9ac
# 参与者公约
## 我们的保证
为了促进一个开放透明且友好的环境,我们作为贡献者和维护者保证:无论年龄、种族、民族、性别认同和表达(方式)、体型、身体健全与否、经验水平、国籍、个人表现、宗教或性别取向,参与者在我们项目和社区中都免于骚扰。
## 我们的标准
有助于创造正面环境的行为包括但不限于:
*
使用友好和包容性语言
*
尊重不同的观点和经历
*
耐心地接受建设性批评
*
关注对社区最有利的事情
*
友善对待其他社区成员
身为参与者不能接受的行为包括但不限于:
*
使用与性有关的言语或是图像,以及不受欢迎的性骚扰
*
捣乱/煽动/造谣的行为或进行侮辱/贬损的评论,人身攻击及政治攻击
*
公开或私下的骚扰
*
未经许可地发布他人的个人资料,例如住址或是电子地址
*
其他可以被合理地认定为不恰当或者违反职业操守的行为
## 我们的责任
项目维护者有责任为「可接受的行为」标准做出诠释,以及对已发生的不被接受的行为采取恰当且公平的纠正措施。
项目维护者有权利及责任去删除、编辑、拒绝与本行为标准有所违背的评论(comments)、提交(commits)、代码、wiki 编辑、问题(issues)和其他贡献,以及项目维护者可暂时或永久性的禁止任何他们认为有不适当、威胁、冒犯、有害行为的贡献者。
## 使用范围
当一个人代表该项目或是其社区时,本行为标准适用于其项目平台和公共平台。
代表项目或是社区的情况,举例来说包括使用官方项目的电子邮件地址、通过官方的社区媒体账号发布或线上或线下事件中担任指定代表。
该项目的呈现方式可由其项目维护者进行进一步的定义及解释。
## 强制执行
可以通过paddle-dev@baidu.com,来联系项目团队来举报滥用、骚扰或其他不被接受的行为。
任何维护团队认为有必要且适合的所有投诉都将进行审查及调查,并做出相对应的回应。项目小组有对事件回报者有保密的义务。具体执行的方针近一步细节可能会单独公布。
没有切实地遵守或是执行本行为标准的项目维护人员,可能会因项目领导人或是其他成员的决定,暂时或是永久地取消其参与资格。
## 来源
本行为标准改编自
[
贡献者公约
][
主页
]
,版本 1.4
可在此观看https://www.contributor-covenant.org/zh-cn/version/1/4/code-of-conduct.html
[
主页
]:
https://www.contributor-covenant.org
README.md
浏览文件 @
68edc91d
# PaddleHub
## 目录
*
[
简介
](
https://github.com/paddlepaddle/paddlehub#%E7%AE%80%E4%BB%8B
)
*
[
环境依赖
](
https://github.com/paddlepaddle/paddlehub#%E7%8E%AF%E5%A2%83%E4%BE%9D%E8%B5%96
)
*
[
安装
](
https://github.com/paddlepaddle/paddlehub#%E5%AE%89%E8%A3%85
)
*
[
快速体验
](
https://github.com/paddlepaddle/paddlehub#%E5%BF%AB%E9%80%9F%E4%BD%93%E9%AA%8C
)
F
*
[
教程
](
https://github.com/paddlepaddle/paddlehub#%E6%95%99%E7%A8%8B
)
*
[
FAQ
](
https://github.com/paddlepaddle/paddlehub#faq
)
*
[
用户交流群
](
https://github.com/paddlepaddle/paddlehub#%E7%94%A8%E6%88%B7%E4%BA%A4%E6%B5%81%E7%BE%A4
)
*
[
更新历史
](
https://github.com/paddlepaddle/paddlehub#%E6%9B%B4%E6%96%B0%E5%8E%86%E5%8F%B2
)
## 简介
[
![Build Status
](
https://travis-ci.org/PaddlePaddle/PaddleHub.svg?branch=develop
)
](https://travis-ci.org/PaddlePaddle/PaddleHub)
[
![License
](
https://img.shields.io/badge/license-Apache%202-blue.svg
)
](LICENSE)
[
![Version
](
https://img.shields.io/github/release/PaddlePaddle/PaddleHub.svg
)
](https://github.com/PaddlePaddle/PaddleHub/releases)
...
...
@@ -7,13 +20,13 @@
PaddleHub是基于PaddlePaddle生态下的预训练模型管理和迁移学习工具,可以结合预训练模型更便捷地开展迁移学习工作。通过PaddleHub,您可以:
*
便捷地获取PaddlePaddle生态下的所有预训练模型,涵盖了图像分类、目标检测、词法分析、语义模型、情感分析、语言模型、视频分类、图像生成八类主流模型。
*
更多详情可查看官网:http
://hub.paddlepaddle.org.cn
*
更多详情可查看官网:http
s://www.paddlepaddle.org.cn/hub
*
通过PaddleHub Fine-tune API,结合少量代码即可完成
**大规模预训练模型**
的迁移学习,具体Demo可参考以下链接:
*
[
文本分类
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
0
.0/demo/text-classification
)
*
[
序列标注
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
0
.0/demo/sequence-labeling
)
*
[
多标签分类
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
0
.0/demo/multi-label-classification
)
*
[
图像分类
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
0
.0/demo/image-classification
)
*
[
检索式问答任务
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
0
.0/demo/qa_classification
)
*
[
文本分类
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
1
.0/demo/text-classification
)
*
[
序列标注
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
1
.0/demo/sequence-labeling
)
*
[
多标签分类
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
1
.0/demo/multi-label-classification
)
*
[
图像分类
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
1
.0/demo/image-classification
)
*
[
检索式问答任务
](
https://github.com/PaddlePaddle/PaddleHub/tree/release/v1.
1
.0/demo/qa_classification
)
*
PaddleHub引入『
**模型即软件**
』的设计理念,支持通过Python API或者命令行工具,一键完成预训练模型地预测,更方便的应用PaddlePaddle模型库。
*
[
PaddleHub命令行工具介绍
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%B7%A5%E5%85%B7
)
...
...
@@ -23,7 +36,71 @@ PaddleHub是基于PaddlePaddle生态下的预训练模型管理和迁移学习
除上述依赖外,PaddleHub的预训练模型和预置数据集需要连接服务端进行下载,请确保机器可以正常访问网络
## 常见问题
## 安装
pip安装方式如下:
```
shell
$
pip
install
paddlehub
```
## 快速体验
安装成功后,执行下面的命令,可以快速体验PaddleHub无需代码、一键预测的命令行功能:
`示例一`
使用
[
词法分析
](
http://www.paddlepaddle.org.cn/hub?filter=category&value=LexicalAnalysis
)
模型LAC进行分词
```
shell
$
hub run lac
--input_text
"今天是个好日子"
[{
'word'
:
[
'今天'
,
'是'
,
'个'
,
'好日子'
]
,
'tag'
:
[
'TIME'
,
'v'
,
'q'
,
'n'
]}]
```
`示例二`
使用
[
情感分析
](
http://www.paddlepaddle.org.cn/hub?filter=category&value=SentimentAnalysis
)
模型Senta对句子进行情感预测
```
shell
$
hub run senta_bilstm
--input_text
"今天是个好日子"
[{
'text'
:
'今天是个好日子'
,
'sentiment_label'
: 2,
'sentiment_key'
:
'positive'
,
'positive_probs'
: 0.6065,
'negative_probs'
: 0.3935
}]
```
`示例三`
使用
[
目标检测
](
http://www.paddlepaddle.org.cn/hub?filter=category&value=ObjectDetection
)
模型 SSD/YOLO v3/Faster RCNN 对图片进行目标检测
```
shell
$
wget
--no-check-certificate
https://paddlehub.bj.bcebos.com/resources/test_object_detection.jpg
$
hub run ssd_mobilenet_v1_pascal
--input_path
test_object_detection.jpg
$
hub run yolov3_coco2017
--input_path
test_object_detection.jpg
$
hub run faster_rcnn_coco2017
--input_path
test_object_detection.jpg
```
![
SSD检测结果
](
https://raw.githubusercontent.com/PaddlePaddle/PaddleHub/release/v1.0.0/docs/imgs/object_detection_result.png
)
除了上述三类模型外,PaddleHub还发布了语言模型、语义模型、图像分类、生成模型、视频分类等业界主流模型,更多PaddleHub已经发布的模型,请前往 https://www.paddlepaddle.org.cn/hub 查看
同时,我们在AI Studio和AIBook上提供了IPython NoteBook形式的demo,您可以直接在平台上在线体验,链接如下:
*
ERNIE文本分类:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79380
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/?_=1562072915183#/bml/aibook/ernie_txt_cls
)
*
ERNIE序列标注:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79377
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/?_=1562072915183#/bml/aibook/ernie_seq_label
)
*
ELMo文本分类:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79400
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/#/bml/aibook/elmo_txt_cls
)
*
senta情感分类:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79398
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/#/bml/aibook/senta_bilstm
)
*
图像分类:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79378
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/#/bml/aibook/img_cls
)
## 教程
[
API
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub-Finetune-API
)
[
迁移学习
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub%E4%B8%8E%E8%BF%81%E7%A7%BB%E5%AD%A6%E4%B9%A0
)
[
自定义迁移任务
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub:-%E8%87%AA%E5%AE%9A%E4%B9%89Task
)
## FAQ
### 问题一
...
...
@@ -61,7 +138,7 @@ $ hub uninstall ernie
**原因**
PaddleHub中的预训练模型和预置数据集都需要通过服务端进行下载,因此Paddle
Hub默认用户访问外网权限。
PaddleHub中的预训练模型和预置数据集都需要通过服务端进行下载,因此PaddleHub默认用户访问外网权限。
可以通过以下命令确认是否可以访问外网。
```
python
...
...
@@ -86,77 +163,18 @@ PaddleHub 1.1.1版本已支持离线运行Module
**解决方法**
参考
[
PaddleHub
Finetune
适配自定义数据集完成Finetune
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub%E9%80%82%E9%85%8D%E8%87%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E5%AE%8C%E6%88%90FineTune
)
参考
[
PaddleHub适配自定义数据集完成Finetune
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub%E9%80%82%E9%85%8D%E8%87%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E5%AE%8C%E6%88%90FineTune
)
##
答疑
##
# 更多问题
当安装或者使用遇到问题时,可以通过
[
FAQ
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub-FAQ
)
查找解决方案。
如果在FAQ中没有找到解决方案,欢迎您将问题和bug报告以
[
Github Issues
](
https://github.com/PaddlePaddle/PaddleHub/issues
)
的形式提交给我们,我们会第一时间进行跟进
## 安装
pip安装方式如下:
```
shell
$
pip
install
paddlehub
```
## 快速体验
安装成功后,执行下面的命令,可以快速体验PaddleHub无需代码、一键预测的命令行功能:
`示例一`
使用
[
词法分析
](
http://www.paddlepaddle.org.cn/hub?filter=category&value=LexicalAnalysis
)
模型LAC进行分词
```
shell
$
hub run lac
--input_text
"今天是个好日子"
[{
'word'
:
[
'今天'
,
'是'
,
'个'
,
'好日子'
]
,
'tag'
:
[
'TIME'
,
'v'
,
'q'
,
'n'
]}]
```
`示例二`
## 用户交流群
使用
[
情感分析
](
http://www.paddlepaddle.org.cn/hub?filter=category&value=SentimentAnalysis
)
模型Senta对句子进行情感预测
```
shell
$
hub run senta_bilstm
--input_text
"今天是个好日子"
[{
'text'
:
'今天是个好日子'
,
'sentiment_label'
: 2,
'sentiment_key'
:
'positive'
,
'positive_probs'
: 0.6065,
'negative_probs'
: 0.3935
}]
```
*
飞桨PaddlePaddle 交流群:432676488(QQ群)
*
飞桨 ERNIE交流群:760439550(QQ群)
`示例三`
使用
[
目标检测
](
http://www.paddlepaddle.org.cn/hub?filter=category&value=ObjectDetection
)
模型 SSD/YOLO v3/Faster RCNN 对图片进行目标检测
```
shell
$
wget
--no-check-certificate
https://paddlehub.bj.bcebos.com/resources/test_object_detection.jpg
$
hub run ssd_mobilenet_v1_pascal
--input_path
test_object_detection.jpg
$
hub run yolov3_coco2017
--input_path
test_object_detection.jpg
$
hub run faster_rcnn_coco2017
--input_path
test_object_detection.jpg
```
![
SSD检测结果
](
https://raw.githubusercontent.com/PaddlePaddle/PaddleHub/release/v1.0.0/docs/imgs/object_detection_result.png
)
除了上述三类模型外,PaddleHub还发布了语言模型、语义模型、图像分类、生成模型、视频分类等业界主流模型,更多PaddleHub已经发布的模型,请前往 http://hub.paddlepaddle.org.cn 查看
## 教程
[
API
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub-Finetune-API
)
[
迁移学习
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub%E4%B8%8E%E8%BF%81%E7%A7%BB%E5%AD%A6%E4%B9%A0
)
[
自定义迁移任务
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub:-%E8%87%AA%E5%AE%9A%E4%B9%89Task
)
## 在线体验
我们在AI Studio和AIBook上提供了IPython NoteBook形式的demo,您可以直接在平台上在线体验,链接如下:
*
ERNIE文本分类:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79380
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/?_=1562072915183#/bml/aibook/ernie_txt_cls
)
*
ERNIE序列标注:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79377
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/?_=1562072915183#/bml/aibook/ernie_seq_label
)
*
ELMo文本分类:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79400
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/#/bml/aibook/elmo_txt_cls
)
*
senta情感分类:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79398
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/#/bml/aibook/senta_bilstm
)
*
图像分类:
*
[
AI Studio
](
https://aistudio.baidu.com/aistudio/projectDetail/79378
)
*
[
AIBook
](
https://console.bce.baidu.com/bml/#/bml/aibook/img_cls
)
## 更新历史
...
...
@@ -168,8 +186,6 @@ $ hub run faster_rcnn_coco2017 --input_path test_object_detection.jpg
### PaddleHub v1.1.0
*
PaddleHub 新增 ERNIE 2.0
*
升级Reader, 支持自动传送数据给Ernie 1.0/2.0
*
新增数据集GLUE(MRPC、QQP、SST-2、CoLA、QNLI、RTE、MNLI)
### PaddleHub v1.0.1
...
...
@@ -177,27 +193,9 @@ $ hub run faster_rcnn_coco2017 --input_path test_object_detection.jpg
### PaddleHub v1.0.0
*
全新发布PaddleHub官网,易用性全面提升
*
新增网站 http://hub.paddlepaddle.org.cn 包含PaddlePaddle生态的预训练模型使用介绍
*
迁移学习Demo接入AI Studio与AI Book,无需安装即可快速体验
*
全新发布
[
PaddleHub官网
](
https://www.paddlepaddle.org.cn/hub
)
,易用性全面提升
*
新增29个预训练模型,覆盖文本、图像、视频三大领域;目前官方提供40个预训练模型
*
CV预训练模型:
*
新增图像分类预训练模型11个:SE_ResNeXt, GoogleNet, ShuffleNet等
*
新增目标检测模型Faster-RCNN和YOLOv3
*
新增图像生成模型CycleGAN
*
新增人脸检测模型Pyramidbox
*
新增视频分类模型4个: TSN, TSM, StNet, Non-Local
*
NLP预训练模型
*
新增语义模型ELMo
*
新增情感分析模型5个: Senta-BOW, Senta-CNN, Senta-GRNN, , Senta-LSTM, EmoTect
*
新增中文语义相似度分析模型SimNet
*
升级LAC词法分析模型,新增词典干预功能,支持用户自定义分词
*
Fine-tune API升级,灵活性与性能全面提升
*
支持多卡并行、PyReader多线程IO,Fine-tune速度提升60%
*
简化finetune、evaluate、predict等使用逻辑,提升易用性
*
增加事件回调功能,方便用户快速实现自定义迁移学习任务
*
新增多标签分类Fine-tune任务
### PaddleHub v0.5.0
...
...
@@ -210,6 +208,5 @@ $ hub run faster_rcnn_coco2017 --input_path test_object_detection.jpg
*
迁移学习: 提供了基于预训练模型的Finetune API,用户通过少量代码即可完成迁移学习,包括BERT/ERNIE文本分类、序列标注、图像分类迁移等。
## 版权和许可证
PaddleHub由
[
Apache-2.0 license
](
LICENSE
)
提供
demo/sequence-labeling/README.md
浏览文件 @
68edc91d
...
...
@@ -113,7 +113,7 @@ sequence_output = outputs["sequence_output"]
# feed_list的Tensor顺序不可以调整
feed_list
=
[
inputs
[
"input_ids"
].
name
,
inputs
[
"position_ids"
].
name
,
inputs
[
"segment_ids"
].
name
,
inputs
[
"input_mask"
].
name
,
label
.
name
inputs
[
"segment_ids"
].
name
,
inputs
[
"input_mask"
].
name
]
seq_label_task
=
hub
.
SequenceLabelTask
(
...
...
demo/text-classification/text_classifier.py
浏览文件 @
68edc91d
...
...
@@ -120,13 +120,8 @@ if __name__ == '__main__':
]
if
args
.
use_taskid
:
feed_list
=
[
inputs
[
"input_ids"
].
name
,
inputs
[
"position_ids"
].
name
,
inputs
[
"segment_ids"
].
name
,
inputs
[
"input_mask"
].
name
,
inputs
[
"task_ids"
].
name
,
]
feed_list
=
feed_list
.
append
(
inputs
[
"task_ids"
].
name
)
# Select finetune strategy, setup config and finetune
strategy
=
hub
.
AdamWeightDecayStrategy
(
weight_decay
=
args
.
weight_decay
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录