Module: Datasets::CIFAR::Pixelable

Included in:
Record10, Record100
Defined in:
lib/datasets/cifar.rb

Instance Method Summary collapse

Instance Method Details

#pixelsObject



9
10
11
# File 'lib/datasets/cifar.rb', line 9

def pixels
  data.unpack("C*")
end

#to_hObject



13
14
15
16
17
# File 'lib/datasets/cifar.rb', line 13

def to_h
  hash = super
  hash[:pixels] = pixels
  hash
end