Table Of Contents
Table Of Contents

unpack

mxnet.recordio.unpack(s)[source]

Unpack a MXImageRecord to string.

Parameters:s (str) – String buffer from MXRecordIO.read.
Returns:
  • header (IRHeader) – Header of the image record.
  • s (str) – Unpacked string.

Examples

>>> record = mx.recordio.MXRecordIO('test.rec', 'r')
>>> item = record.read()
>>> header, s = mx.recordio.unpack(item)
>>> header
HEADER(flag=0, label=14.0, id=20129312, id2=0)