Content

Board ID 796
Writer 허진경
Write Date 2018-01-19 06:10:16
Subject MNIST 데이터 확인하기
Content 코드와 결과
oldPar = par(mfrow=c(5,5), mar=c(1,1,1,1))
to.read = file("./Data/MNIST/train-images.idx3-ubyte", "rb")
readBin(to.read, integer(), n=4, endian="big")  # skip header 2051 60000    28    28
for(i in 1:25){
  m = matrix(readBin(to.read, integer(), n=28*28, size=1, signed=F), 28, 28);
  image(m[,28:1])
}
par(oldPar)