Sha256: 028d4f59a03693339e321f73e68b334721ee195c977106acce13e7efd32efc5c
Contents?: true
Size: 548 Bytes
Versions: 5
Compression:
Stored size: 548 Bytes
Contents
require 'mnist' train_images = Mnist.load_images('./train-images-idx3-ubyte.gz') train_labels = Mnist.load_labels('./train-labels-idx1-ubyte.gz') puts train_images[0].class puts train_images[1].class puts train_images[2].size puts train_images[2][0].size puts train_images[2][59999][783].class puts train_images[2][59999].class puts "------------------------------" 10.times do |j| train_images[2][j].unpack('C*').each_with_index do |e, i| print(e > 50 ? 'x' : ' ') puts if (i % 28) == 0 end puts puts train_labels[j] end
Version data entries
5 entries across 5 versions & 1 rubygems