diff --git a/label_semantic_roles/README.en.md b/label_semantic_roles/README.en.md index 4accfe0aac6eaf7c42b92e3ffaee145d9e8e92b3..b2a75cb03db3a2ef90a5b2a492fdac020507d396 100644 --- a/label_semantic_roles/README.en.md +++ b/label_semantic_roles/README.en.md @@ -440,15 +440,15 @@ trainer = paddle.trainer.SGD(cost=crf_cost, As mentioned in data preparation section, we will use CoNLL 2005 test corpus as training data set. `conll05.test()` outputs one training instance at a time. It will be shuffled, and batched into mini batches as input. ```python -reader = paddle.reader.batched( +reader = paddle.batch( paddle.reader.shuffle( conll05.test(), buf_size=8192), batch_size=20) ``` -`reader_dict` is used to specify relationship between data instance and layer layer. For example, according to following `reader_dict`, the 0th column of data instance produced by`conll05.test()` correspond to data layer named `word_data`. +`feeding` is used to specify relationship between data instance and layer layer. For example, according to following `feeding`, the 0th column of data instance produced by`conll05.test()` correspond to data layer named `word_data`. ```python -reader_dict = { +feeding = { 'word_data': 0, 'ctx_n2_data': 1, 'ctx_n1_data': 2, @@ -478,7 +478,7 @@ trainer.train( reader=reader, event_handler=event_handler, num_passes=10000, - reader_dict=reader_dict) + feeding=feeding) ``` ## Conclusion diff --git a/label_semantic_roles/README.md b/label_semantic_roles/README.md index a96d9604fc52661a388fd45a8bfcac099b6d4e1f..0bead4228652b1b781a9bfe5beccc3c483928ad4 100644 --- a/label_semantic_roles/README.md +++ b/label_semantic_roles/README.md @@ -409,11 +409,11 @@ reader = paddle.batch( conll05.test(), buf_size=8192), batch_size=20) ``` -通过`reader_dict`来指定每一个数据和data_layer的对应关系。 例如 下面`reader_dict`表示: `conll05.test()`产生数据的第0列对应`word_data`层的特征。 +通过`feeding`来指定每一个数据和data_layer的对应关系。 例如 下面`feeding`表示: `conll05.test()`产生数据的第0列对应`word_data`层的特征。 ```python -reader_dict = { +feeding = { 'word_data': 0, 'ctx_n2_data': 1, 'ctx_n1_data': 2, @@ -443,7 +443,7 @@ trainer.train( reader=reader, event_handler=event_handler, num_passes=10000, - reader_dict=reader_dict) + feeding=feeding) ``` ## 总结