Class: DNN::Loaders::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/dnn/core/savers.rb

Direct Known Subclasses

JSONLoader, MarshalLoader

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ Loader

Returns a new instance of Loader.



9
10
11
# File 'lib/dnn/core/savers.rb', line 9

def initialize(model)
  @model = model
end

Instance Method Details

#load(file_name) ⇒ Object



13
14
15
# File 'lib/dnn/core/savers.rb', line 13

def load(file_name)
  load_bin(File.binread(file_name))
end

#load_bin(bin) ⇒ Object

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/dnn/core/savers.rb', line 17

def load_bin(bin)
  raise NotImplementedError, "Class '#{self.class.name}' has implement method 'load_bin'"
end