code: def test_simple_dill_storage(self):
      bpnet = algorithms.GradientDescent(
          [
              layers.Input(2),
              layers.Sigmoid(3),
              layers.Sigmoid(1),
          ],
          step=0.25,
          batch_size=None,
      )
      data, target = datasets.make_regression(n_features=2, n_targets=1)
  
      data = preprocessing.MinMaxScaler().fit_transform(data)
      target_scaler = preprocessing.MinMaxScaler()
      target = target_scaler.fit_transform(target.reshape(-1, 1))
  
      with tempfile.NamedTemporaryFile() as temp:
          original_layers = bpnet.network.layers
          test_layer_weights = self.eval(original_layers[1].weight)
  
          dill.dump(bpnet, temp)
          temp.file.seek(0)
  
          restored_bpnet = dill.load(temp)
          temp.file.seek(0)
  
          restored_layers = restored_bpnet.network.layers
  
          self.assertEqual(0.25, restored_bpnet.step)
          self.assertEqual(3, len(restored_layers))
          np.testing.assert_array_equal(
              test_layer_weights, self.eval(restored_layers[1].weight)
          )
  
          # Check if it's possible to recover training state
          bpnet.train(data, target, epochs=5)
          real_bpnet_error = bpnet.score(data, target)
          updated_input_weight = self.eval(original_layers[1].weight)
  
          dill.dump(bpnet, temp)
          temp.file.seek(0)
  
          restored_bpnet_2 = dill.load(temp)
          temp.file.seek(0)
  
          restored_layers_2 = restored_bpnet_2.network.layers
          np.testing.assert_array_equal(
              updated_input_weight,
              self.eval(restored_layers_2[1].weight),
          )
  
          restored_bpnet_error = restored_bpnet_2.score(data, target)
          self.assertEqual(real_bpnet_error, restored_bpnet_error)
  
file_path: neupy/tests/storage/test_object_storage.py
imports: import tempfile
  import dill
  import numpy
  from sklearn import datasets, preprocessing
  from six.moves import cPickle
  from neupy import algorithms, layers, init
  from base import BaseTestCase
  from helpers import catch_stdout
label_desc: Use image node_id 1 for calling the BasicStorageTestCase obj's underlying member method code with example usage: obj.test_simple_dill_storage() without return types