Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
base_module fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Roshrini committed Nov 8, 2018
1 parent 1fef81b commit c0551f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions python/mxnet/module/base_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions python/mxnet/recordio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
<mxnet.recordio.MXRecordIO object at 0x10ef40ed0>
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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())
Expand All @@ -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):
Expand All @@ -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)
Expand Down

0 comments on commit c0551f2

Please sign in to comment.