From c0551f293bd5242b12c2bc8529f6a93427463e9e Mon Sep 17 00:00:00 2001 From: Roshani Nagmote Date: Thu, 8 Nov 2018 14:14:59 -0800 Subject: [PATCH] base_module fix --- python/mxnet/module/base_module.py | 4 ++-- python/mxnet/recordio.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/python/mxnet/module/base_module.py b/python/mxnet/module/base_module.py index c534261eacc2..babea53d6e40 100644 --- a/python/mxnet/module/base_module.py +++ b/python/mxnet/module/base_module.py @@ -279,8 +279,8 @@ def score(self, eval_data, eval_metric, num_batch=None, batch_end_callback=None, def iter_predict(self, eval_data, num_batch=None, reset=True, sparse_row_id_fn=None): """Iterates over predictions. - Example Usage: - ---------- + Examples + -------- >>> for pred, i_batch, batch in module.iter_predict(eval_data): ... # pred is a list of outputs from the module ... # i_batch is a integer diff --git a/python/mxnet/recordio.py b/python/mxnet/recordio.py index 19962a8d91e1..2def141c9340 100644 --- a/python/mxnet/recordio.py +++ b/python/mxnet/recordio.py @@ -36,7 +36,7 @@ class MXRecordIO(object): """Reads/writes `RecordIO` data format, supporting sequential read and write. - Examples: + Examples --------- >>> record = mx.recordio.MXRecordIO('tmp.rec', 'w') @@ -124,7 +124,7 @@ def reset(self): If the record is opened with 'w', this function will truncate the file to empty. - Examples: + Examples --------- >>> record = mx.recordio.MXRecordIO('tmp.rec', 'r') >>> for i in range(2): @@ -143,7 +143,7 @@ def reset(self): def write(self, buf): """Inserts a string buffer as a record. - Examples: + Examples --------- >>> record = mx.recordio.MXRecordIO('tmp.rec', 'w') >>> for i in range(5): @@ -163,7 +163,7 @@ def write(self, buf): def read(self): """Returns record as a string. - Examples: + Examples --------- >>> record = mx.recordio.MXRecordIO('tmp.rec', 'r') >>> for i in range(5): @@ -196,7 +196,7 @@ def read(self): class MXIndexedRecordIO(MXRecordIO): """Reads/writes `RecordIO` data format, supporting random access. - Examples: + Examples --------- >>> for i in range(5): ... record.write_idx(i, 'record_%d'%i) @@ -261,7 +261,7 @@ def seek(self, idx): def tell(self): """Returns the current position of write head. - Examples: + Examples --------- >>> record = mx.recordio.MXIndexedRecordIO('tmp.idx', 'tmp.rec', 'w') >>> print(record.tell()) @@ -283,7 +283,7 @@ def tell(self): def read_idx(self, idx): """Returns the record at given index. - Examples: + Examples --------- >>> record = mx.recordio.MXIndexedRecordIO('tmp.idx', 'tmp.rec', 'w') >>> for i in range(5): @@ -299,7 +299,7 @@ def read_idx(self, idx): def write_idx(self, idx, buf): """Inserts input record at given index. - Examples: + Examples --------- >>> for i in range(5): ... record.write_idx(i, 'record_%d'%i)