Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleHub
提交
ff97d6b3
P
PaddleHub
项目概览
PaddlePaddle
/
PaddleHub
大约 1 年 前同步成功
通知
282
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看板
提交
ff97d6b3
编写于
4月 22, 2019
作者:
Z
Zeyu Chen
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
https://github.com/PaddlePaddle/PaddleHub
into develop
上级
87c03753
1ab96195
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
21 addition
and
7 deletion
+21
-7
README.md
README.md
+2
-2
demo/text-classification/run_classifier.sh
demo/text-classification/run_classifier.sh
+1
-1
paddlehub/__init__.py
paddlehub/__init__.py
+9
-0
paddlehub/dataset/chnsenticorp.py
paddlehub/dataset/chnsenticorp.py
+2
-1
paddlehub/dataset/lcqmc.py
paddlehub/dataset/lcqmc.py
+2
-1
paddlehub/dataset/msra_ner.py
paddlehub/dataset/msra_ner.py
+3
-1
paddlehub/dataset/nlpcc_dbqa.py
paddlehub/dataset/nlpcc_dbqa.py
+2
-1
未找到文件。
README.md
浏览文件 @
ff97d6b3
...
...
@@ -54,9 +54,9 @@ $ hub search
```
## 深入了解PaddleHub
*
[
命令行
功能
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub-%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%8E%A5%E5%8F%A3
)
*
[
命令行
工具
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%B7%A5%E5%85%B7
)
*
[
Finetune API与迁移学习
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub%E4%B8%8E%E8%BF%81%E7%A7%BB%E5%AD%A6%E4%B9%A0
)
*
[
API
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub-Fine
-
tune-API
)
*
[
API
](
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub-Finetune-API
)
## 答疑
...
...
demo/text-classification/run_classifier.sh
浏览文件 @
ff97d6b3
export
CUDA_VISIBLE_DEVICES
=
3
export
CUDA_VISIBLE_DEVICES
=
0
# User can select chnsenticorp, nlpcc_dbqa, lcqmc for different task
DATASET
=
"chnsenticorp"
...
...
paddlehub/__init__.py
浏览文件 @
ff97d6b3
...
...
@@ -11,6 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#coding:utf-8
import
six
from
.
import
module
from
.
import
common
from
.
import
io
...
...
@@ -41,3 +45,8 @@ from .finetune.finetune import finetune_and_eval
from
.finetune.config
import
RunConfig
from
.finetune.strategy
import
AdamWeightDecayStrategy
from
.finetune.strategy
import
DefaultStrategy
if
six
.
PY2
:
import
sys
reload
(
sys
)
sys
.
setdefaultencoding
(
"UTF-8"
)
\ No newline at end of file
paddlehub/dataset/chnsenticorp.py
浏览文件 @
ff97d6b3
...
...
@@ -17,6 +17,7 @@ from __future__ import division
from
__future__
import
print_function
from
collections
import
namedtuple
import
codecs
import
os
import
csv
...
...
@@ -79,7 +80,7 @@ class ChnSentiCorp(HubDataset):
def
_read_tsv
(
self
,
input_file
,
quotechar
=
None
):
"""Reads a tab separated value file."""
with
open
(
input_file
,
"r
"
)
as
f
:
with
codecs
.
open
(
input_file
,
"r"
,
encoding
=
"UTF-8
"
)
as
f
:
reader
=
csv
.
reader
(
f
,
delimiter
=
"
\t
"
,
quotechar
=
quotechar
)
examples
=
[]
seq_id
=
0
...
...
paddlehub/dataset/lcqmc.py
浏览文件 @
ff97d6b3
...
...
@@ -17,6 +17,7 @@ from __future__ import division
from
__future__
import
print_function
from
collections
import
namedtuple
import
codecs
import
os
import
csv
...
...
@@ -75,7 +76,7 @@ class LCQMC(HubDataset):
def
_read_tsv
(
self
,
input_file
,
quotechar
=
None
):
"""Reads a tab separated value file."""
with
open
(
input_file
,
"r
"
)
as
f
:
with
codecs
.
open
(
input_file
,
"r"
,
encoding
=
"UTF-8
"
)
as
f
:
reader
=
csv
.
reader
(
f
,
delimiter
=
"
\t
"
,
quotechar
=
quotechar
)
examples
=
[]
seq_id
=
0
...
...
paddlehub/dataset/msra_ner.py
浏览文件 @
ff97d6b3
...
...
@@ -17,8 +17,10 @@ from __future__ import division
from
__future__
import
print_function
import
os
import
codecs
import
csv
import
json
import
six
from
collections
import
namedtuple
from
paddlehub.dataset
import
InputExample
,
HubDataset
...
...
@@ -85,7 +87,7 @@ class MSRA_NER(HubDataset):
def
_read_tsv
(
self
,
input_file
,
quotechar
=
None
):
"""Reads a tab separated value file."""
with
open
(
input_file
,
"r
"
)
as
f
:
with
codecs
.
open
(
input_file
,
"r"
,
encoding
=
"UTF-8
"
)
as
f
:
reader
=
csv
.
reader
(
f
,
delimiter
=
"
\t
"
,
quotechar
=
quotechar
)
examples
=
[]
seq_id
=
0
...
...
paddlehub/dataset/nlpcc_dbqa.py
浏览文件 @
ff97d6b3
...
...
@@ -17,6 +17,7 @@ from __future__ import division
from
__future__
import
print_function
from
collections
import
namedtuple
import
codecs
import
os
import
csv
...
...
@@ -81,7 +82,7 @@ class NLPCC_DBQA(HubDataset):
def
_read_tsv
(
self
,
input_file
,
quotechar
=
None
):
"""Reads a tab separated value file."""
with
open
(
input_file
,
"r
"
)
as
f
:
with
codecs
.
open
(
input_file
,
"r"
,
encoding
=
"UTF-8
"
)
as
f
:
reader
=
csv
.
reader
(
f
,
delimiter
=
"
\t
"
,
quotechar
=
quotechar
)
examples
=
[]
seq_id
=
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录