Class: DNN::Loaders::JSONLoader
Instance Method Summary collapse
Methods inherited from Loader
Constructor Details
This class inherits a constructor from DNN::Loaders::Loader
Instance Method Details
#load_bin(bin) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/dnn/core/savers.rb', line 39 def load_bin(bin) data = JSON.parse(bin, symbolize_names: true) unless @model.class.name == data[:class] raise DNNError, "Class name is mismatch. Target model is #{@model.class.name}. But loading model is #{data[:class]}." end set_all_params_base64_data(data[:params]) end |