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, setCurrentIndex
close, 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, writeUTF
public MnistLabelFile(String name, String mode) throws IOException
name
- the system-dependent filenamemode
- the access modeIOException
FileNotFoundException
public int readLabel() throws IOException
IOException
public int[] readLabels(int num) throws IOException
IOException
protected int getMagicNumber()
MnistDbFile
getMagicNumber
in class MnistDbFile
Copyright © 2016. All Rights Reserved.