public class MnistLabelFile extends MnistDbFile
| Constructor and Description |
|---|
MnistLabelFile(String name,
String mode)
Creates new MNIST database label file ready for reading.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
getMagicNumber()
MNIST DB files start with unique integer number.
|
int |
readLabel()
Reads the integer at the current position.
|
int[] |
readLabels(int num)
Read the specified number of labels from the current position
|
getCount, getCurrentIndex, getEntryLength, getHeaderSize, next, prev, setCurrentIndexclose, getChannel, getFD, getFilePointer, length, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFpublic MnistLabelFile(String name, String mode) throws IOException
name - the system-dependent filenamemode - the access modeIOExceptionFileNotFoundExceptionpublic int readLabel()
throws IOException
IOExceptionpublic int[] readLabels(int num)
throws IOException
IOExceptionprotected int getMagicNumber()
MnistDbFilegetMagicNumber in class MnistDbFileCopyright © 2016. All Rights Reserved.