Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
398d50dd
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
398d50dd
编写于
4月 13, 2017
作者:
Q
qijun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix typo error
上级
b571a414
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
26 addition
and
26 deletion
+26
-26
python/paddle/v2/dataset/cifar.py
python/paddle/v2/dataset/cifar.py
+4
-4
python/paddle/v2/dataset/conll05.py
python/paddle/v2/dataset/conll05.py
+2
-2
python/paddle/v2/dataset/imdb.py
python/paddle/v2/dataset/imdb.py
+2
-2
python/paddle/v2/dataset/imikolov.py
python/paddle/v2/dataset/imikolov.py
+5
-5
python/paddle/v2/dataset/mnist.py
python/paddle/v2/dataset/mnist.py
+3
-3
python/paddle/v2/dataset/movielens.py
python/paddle/v2/dataset/movielens.py
+2
-2
python/paddle/v2/dataset/sentiment.py
python/paddle/v2/dataset/sentiment.py
+1
-1
python/paddle/v2/dataset/uci_housing.py
python/paddle/v2/dataset/uci_housing.py
+3
-3
python/paddle/v2/dataset/wmt14.py
python/paddle/v2/dataset/wmt14.py
+4
-4
未找到文件。
python/paddle/v2/dataset/cifar.py
浏览文件 @
398d50dd
...
...
@@ -66,12 +66,12 @@ def reader_creator(filename, sub_name):
def
train100
():
"""
CIFAR-100 train set creator.
CIFAR-100 train
ing
set creator.
It returns a reader creator, each sample in the reader is image pixels in
[0, 1] and label in [0, 99].
:return: Train reader creator
:return: Train
ing
reader creator
:rtype: callable
"""
return
reader_creator
(
...
...
@@ -93,12 +93,12 @@ def test100():
def
train10
():
"""
CIFAR-10 train set creator.
CIFAR-10 train
ing
set creator.
It returns a reader creator, each sample in the reader is image pixels in
[0, 1] and label in [0, 9].
:return: Train reader creator
:return: Train
ing
reader creator
:rtype: callable
"""
return
reader_creator
(
...
...
python/paddle/v2/dataset/conll05.py
浏览文件 @
398d50dd
...
...
@@ -199,12 +199,12 @@ def test():
"""
Conll05 test set creator.
Because the train dataset is not free, the test dataset is used for
Because the train
ing
dataset is not free, the test dataset is used for
training. It returns a reader creator, each sample in the reader is nine
features, including sentence sequence, predicate, predicate context,
predicate context flag and tagged sequence.
:return: Train reader creator
:return: Train
ing
reader creator
:rtype: callable
"""
word_dict
,
verb_dict
,
label_dict
=
get_dict
()
...
...
python/paddle/v2/dataset/imdb.py
浏览文件 @
398d50dd
...
...
@@ -121,14 +121,14 @@ def reader_creator(pos_pattern, neg_pattern, word_idx, buffer_size):
def
train
(
word_idx
):
"""
IMDB train set creator.
IMDB train
ing
set creator.
It returns a reader creator, each sample in the reader is an zero-based ID
sequence and label in [0, 1].
:param word_idx: word dictionary
:type word_idx: dict
:return: Train reader creator
:return: Train
ing
reader creator
:rtype: callable
"""
return
reader_creator
(
...
...
python/paddle/v2/dataset/imikolov.py
浏览文件 @
398d50dd
...
...
@@ -15,8 +15,8 @@
imikolov's simple dataset.
This module will download dataset from
http://www.fit.vutbr.cz/~imikolov/rnnlm/ and parse train
/test set into paddle
reader creators.
http://www.fit.vutbr.cz/~imikolov/rnnlm/ and parse train
ing set and test set
into paddle
reader creators.
"""
import
paddle.v2.dataset.common
import
collections
...
...
@@ -91,7 +91,7 @@ def reader_creator(filename, word_idx, n):
def
train
(
word_idx
,
n
):
"""
imikolov train set creator.
imikolov train
ing
set creator.
It returns a reader creator, each sample in the reader is a word ID
tuple.
...
...
@@ -100,7 +100,7 @@ def train(word_idx, n):
:type word_idx: dict
:param n: sliding window size
:type n: int
:return: Train reader creator
:return: Train
ing
reader creator
:rtype: callable
"""
return
reader_creator
(
'./simple-examples/data/ptb.train.txt'
,
word_idx
,
n
)
...
...
@@ -117,7 +117,7 @@ def test(word_idx, n):
:type word_idx: dict
:param n: sliding window size
:type n: int
:return: T
rain
reader creator
:return: T
est
reader creator
:rtype: callable
"""
return
reader_creator
(
'./simple-examples/data/ptb.valid.txt'
,
word_idx
,
n
)
...
...
python/paddle/v2/dataset/mnist.py
浏览文件 @
398d50dd
...
...
@@ -15,7 +15,7 @@
MNIST dataset.
This module will download dataset from http://yann.lecun.com/exdb/mnist/ and
parse train
/
test set into paddle reader creators.
parse train
ing set and
test set into paddle reader creators.
"""
import
paddle.v2.dataset.common
import
subprocess
...
...
@@ -76,12 +76,12 @@ def reader_creator(image_filename, label_filename, buffer_size):
def
train
():
"""
MNIST train set creator.
MNIST train
ing
set creator.
It returns a reader creator, each sample in the reader is image pixels in
[0, 1] and label in [0, 9].
:return: Train reader creator
:return: Train
ing
reader creator
:rtype: callable
"""
return
reader_creator
(
...
...
python/paddle/v2/dataset/movielens.py
浏览文件 @
398d50dd
...
...
@@ -17,8 +17,8 @@ Movielens 1-M dataset.
Movielens 1-M dataset contains 1 million ratings from 6000 users on 4000
movies, which was collected by GroupLens Research. This module will download
Movielens 1-M dataset from
http://files.grouplens.org/datasets/movielens/ml-1m.zip and parse train
/test
set into paddle reader creators.
http://files.grouplens.org/datasets/movielens/ml-1m.zip and parse train
ing
set
and test set
into paddle reader creators.
"""
...
...
python/paddle/v2/dataset/sentiment.py
浏览文件 @
398d50dd
...
...
@@ -113,7 +113,7 @@ def reader_creator(data):
def
train
():
"""
Default train set reader creator
Default train
ing
set reader creator
"""
data_set
=
load_sentiment_data
()
return
reader_creator
(
data_set
[
0
:
NUM_TRAINING_INSTANCES
])
...
...
python/paddle/v2/dataset/uci_housing.py
浏览文件 @
398d50dd
...
...
@@ -16,7 +16,7 @@ UCI Housing dataset.
This module will download dataset from
https://archive.ics.uci.edu/ml/machine-learning-databases/housing/ and
parse train
/
test set into paddle reader creators.
parse train
ing set and
test set into paddle reader creators.
"""
import
numpy
as
np
...
...
@@ -73,12 +73,12 @@ def load_data(filename, feature_num=14, ratio=0.8):
def
train
():
"""
UCI_HOUSING train set creator.
UCI_HOUSING train
ing
set creator.
It returns a reader creator, each sample in the reader is features after
normalization and price number.
:return: Train reader creator
:return: Train
ing
reader creator
:rtype: callable
"""
global
UCI_TRAIN_DATA
...
...
python/paddle/v2/dataset/wmt14.py
浏览文件 @
398d50dd
...
...
@@ -16,7 +16,7 @@ WMT14 dataset.
The original WMT14 dataset is too large and a small set of data for set is
provided. This module will download dataset from
http://paddlepaddle.cdn.bcebos.com/demo/wmt_shrinked_data/wmt14.tgz and
parse train
/
test set into paddle reader creators.
parse train
ing set and
test set into paddle reader creators.
"""
import
tarfile
...
...
@@ -105,13 +105,13 @@ def reader_creator(tar_file, file_name, dict_size):
def
train
(
dict_size
):
"""
WMT14 train set creator.
WMT14 train
ing
set creator.
It returns a reader creator, each sample in the reader is source language
word ID sequence, target language word ID sequence and next word ID
sequence.
:return: Train reader creator
:return: Train
ing
reader creator
:rtype: callable
"""
return
reader_creator
(
...
...
@@ -126,7 +126,7 @@ def test(dict_size):
word ID sequence, target language word ID sequence and next word ID
sequence.
:return: T
rain
reader creator
:return: T
est
reader creator
:rtype: callable
"""
return
reader_creator
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录