diff --git a/doc/api/v2/data.rst b/doc/api/v2/data.rst index 69fdea79b16de4f5ff101919129b486d01019a09..b011bd959de5e8a7d70b9c07c96207efa67f94e9 100644 --- a/doc/api/v2/data.rst +++ b/doc/api/v2/data.rst @@ -1,5 +1,5 @@ ================================== -Data Reader Inferface and DataSets +Data Reader Inferface and DataSets ================================== @@ -78,7 +78,7 @@ imikolov :noindex: movielens -+++++++++ ++++++++++ .. automodule:: paddle.v2.dataset.movielens :members: diff --git a/doc/api/v2/run_logic.rst b/doc/api/v2/run_logic.rst index 1b3d23d1e8f782a77f86927267ba94101df0efc6..5c97651f6536d89d2b5926d4b2907a547aa86b55 100644 --- a/doc/api/v2/run_logic.rst +++ b/doc/api/v2/run_logic.rst @@ -20,11 +20,12 @@ Event ===== .. automodule:: paddle.v2.event - :members: + :members: :noindex: Inference ========= .. autofunction:: paddle.v2.infer - :noindex: \ No newline at end of file + :noindex: + \ No newline at end of file diff --git a/python/paddle/v2/dataset/cifar.py b/python/paddle/v2/dataset/cifar.py index adcf8fbe76365f76236769f3b3c492b33e2e1455..8a2642d8dd832530f64499ab60e220bd8bb0dc02 100644 --- a/python/paddle/v2/dataset/cifar.py +++ b/python/paddle/v2/dataset/cifar.py @@ -17,11 +17,11 @@ CIFAR dataset. This module will download dataset from https://www.cs.toronto.edu/~kriz/cifar.html and parse train/test set into paddle reader creators. -The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 +The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and 10000 test images. -The CIFAR-100 dataset is just like the CIFAR-10, except it has 100 classes containing -600 images each. There are 500 training images and 100 testing images per class. +The CIFAR-100 dataset is just like the CIFAR-10, except it has 100 classes containing +600 images each. There are 500 training images and 100 testing images per class. """ diff --git a/python/paddle/v2/dataset/conll05.py b/python/paddle/v2/dataset/conll05.py index d9ea2d027fb58f46286ed4172a6d92e89b9d4695..cf1ea8ac5a3f14d79c71bceafd61a43ca7919111 100644 --- a/python/paddle/v2/dataset/conll05.py +++ b/python/paddle/v2/dataset/conll05.py @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. """ -Conll05 dataset. -Paddle semantic role labeling Book and demo use this dataset as an example. Because -Conll05 is not free in public, the default downloaded URL is test set of -Conll05 (which is public). Users can change URL and MD5 to their Conll dataset. +Conll05 dataset. +Paddle semantic role labeling Book and demo use this dataset as an example. Because +Conll05 is not free in public, the default downloaded URL is test set of +Conll05 (which is public). Users can change URL and MD5 to their Conll dataset. And a pre-trained word vector model based on Wikipedia corpus is used to initialize SRL model. """ @@ -200,7 +200,7 @@ def test(): Conll05 test set creator. Because the train 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 + 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 diff --git a/python/paddle/v2/dataset/imdb.py b/python/paddle/v2/dataset/imdb.py index e363e21d9533512f93c1e8d264c69f2e97e75259..0340f37f27625b4df03fde4a46d9fb611cb946a7 100644 --- a/python/paddle/v2/dataset/imdb.py +++ b/python/paddle/v2/dataset/imdb.py @@ -14,10 +14,10 @@ """ IMDB dataset. -This module download IMDB dataset from -http://ai.stanford.edu/%7Eamaas/data/sentiment/, which contains a set of 25,000 -highly polar movie reviews for training, and 25,000 for testing. Besides, this -module also provides API for build dictionary and parse train set and test set +This module download IMDB dataset from +http://ai.stanford.edu/%7Eamaas/data/sentiment/, which contains a set of 25,000 +highly polar movie reviews for training, and 25,000 for testing. Besides, this +module also provides API for build dictionary and parse train set and test set into paddle reader creators. """ @@ -122,7 +122,7 @@ def train(word_idx): """ IMDB train set creator. - It returns a reader creator, each sample in the reader is an index + It returns a reader creator, each sample in the reader is an index sequence and label in [0, 1]. :param word_idx: word dictionary @@ -139,7 +139,7 @@ def test(word_idx): """ IMDB test set creator. - It returns a reader creator, each sample in the reader is an index + It returns a reader creator, each sample in the reader is an index sequence and label in [0, 1]. :param word_idx: word dictionary diff --git a/python/paddle/v2/dataset/imikolov.py b/python/paddle/v2/dataset/imikolov.py index 6de5abe1079b755a36bd6cce3a678fcae14df792..917a0be849778aae7939fd953396389ceda06c02 100644 --- a/python/paddle/v2/dataset/imikolov.py +++ b/python/paddle/v2/dataset/imikolov.py @@ -91,7 +91,7 @@ def train(word_idx, n): """ imikolov train set creator. - It returns a reader creator, each sample in the reader is an index + It returns a reader creator, each sample in the reader is an index tuple. :param word_idx: word dictionary @@ -108,7 +108,7 @@ def test(word_idx, n): """ imikolov test set creator. - It returns a reader creator, each sample in the reader is an index + It returns a reader creator, each sample in the reader is an index tuple. :param word_idx: word dictionary diff --git a/python/paddle/v2/dataset/movielens.py b/python/paddle/v2/dataset/movielens.py index 571868d8356e77d16cb781eeda421e7929364db6..822f7f293df126434c9aee89fc13b87ccf0c342f 100644 --- a/python/paddle/v2/dataset/movielens.py +++ b/python/paddle/v2/dataset/movielens.py @@ -14,9 +14,9 @@ """ 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 +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. """ diff --git a/python/paddle/v2/dataset/uci_housing.py b/python/paddle/v2/dataset/uci_housing.py index 57dc4d223bb307dfb8833e88086cfb84f2604d81..3e358e4e8aa24f66b85e3b7f94d145ea7dd5641b 100644 --- a/python/paddle/v2/dataset/uci_housing.py +++ b/python/paddle/v2/dataset/uci_housing.py @@ -14,7 +14,7 @@ """ UCI Housing dataset. -This module will download dataset from +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. """ @@ -75,7 +75,7 @@ def train(): """ UCI_HOUSING train set creator. - It returns a reader creator, each sample in the reader is features after normalization + It returns a reader creator, each sample in the reader is features after normalization and price number. :return: Train reader creator diff --git a/python/paddle/v2/dataset/wmt14.py b/python/paddle/v2/dataset/wmt14.py index 48c39547fd19e819557d3c4102bf0cad52a55fb4..b02d70709519872767c9e49282fc79b6a06f9455 100644 --- a/python/paddle/v2/dataset/wmt14.py +++ b/python/paddle/v2/dataset/wmt14.py @@ -14,7 +14,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 +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. @@ -102,7 +102,7 @@ def train(dict_size): """ WMT14 train set creator. - It returns a reader creator, each sample in the reader is source language word index + It returns a reader creator, each sample in the reader is source language word index sequence, target language word index sequence and next word index sequence. :return: Train reader creator @@ -116,7 +116,7 @@ def test(dict_size): """ WMT14 test set creator. - It returns a reader creator, each sample in the reader is source language word index + It returns a reader creator, each sample in the reader is source language word index sequence, target language word index sequence and next word index sequence. :return: Train reader creator diff --git a/python/paddle/v2/inference.py b/python/paddle/v2/inference.py index 8d027b9e5bbdbd4297d51e79faae483d8f47e6e4..848546a1df420f83774fad367561ca0c2628fb78 100644 --- a/python/paddle/v2/inference.py +++ b/python/paddle/v2/inference.py @@ -49,7 +49,7 @@ class Inference(object): def iter_infer_field(self, field, **kwargs): for result in self.iter_infer(**kwargs): yield [each_result[field] for each_result in result] - + def infer(self, field='value', **kwargs): retv = None for result in self.iter_infer_field(field=field, **kwargs): diff --git a/python/paddle/v2/optimizer.py b/python/paddle/v2/optimizer.py index d153d30ea205e572b5bb55b91edfb808f0de1a57..feefd7d758ba09f5d8f818ca1b12b00c5f0e9797 100644 --- a/python/paddle/v2/optimizer.py +++ b/python/paddle/v2/optimizer.py @@ -195,7 +195,7 @@ class AdaDelta(Optimizer): :param epsilon: :math:`\\rho` in equation :type epsilon: float """ - + def __init__(self, rho=0.95, epsilon=1e-06, **kwargs): learning_method = v1_optimizers.AdaDeltaOptimizer( rho=rho, epsilon=epsilon) diff --git a/python/paddle/v2/trainer.py b/python/paddle/v2/trainer.py index 265f031532f7851f16822f5e7abca9e8a8e8451d..15fcefef45b3a8a4e70ddbf1d94aeb2652c7f5bd 100644 --- a/python/paddle/v2/trainer.py +++ b/python/paddle/v2/trainer.py @@ -130,7 +130,7 @@ class SGD(object): Testing method. Will test input data. :param reader: A reader that reads and yeilds data items. - :type reader: collections.Iterable + :type reader: collections.Iterable :param feeding: Feeding is a map of neural network input name and array index that reader returns. :type feeding: dict