docstr: Test for restore based pretrained model loading.
docstr_tok: ["Test","for","restore","based","pretrained","model","loading","."]
code: def test_restore_equivalency(self):
      """Test for restore based pretrained model loading."""
      source_model = MLP(
          feature_dim=self.feature_dim,
          hidden_layer_size=self.hidden_layer_size,
          learning_rate=0.003,
      )
  
      source_model.fit(self.dataset, nb_epoch=1000)
  
      dest_model = MLP(
          feature_dim=self.feature_dim,
          hidden_layer_size=self.hidden_layer_size,
      )
  
      dest_model.load_from_pretrained(
          source_model=source_model,
          assignment_map=None,
          value_map=None,
          model_dir=None,
          include_top=True,
      )
  
      predictions = np.squeeze(
          dest_model.predict_on_batch(self.dataset.X)
      )
      np.testing.assert_array_almost_equal(
          self.dataset.y, np.round(predictions)
      )
  
file_path: deepchem/deepchem/models/tests/test_pretrained_torch.py
imports: import unittest
  import pytest
  import deepchem
  import numpy
label_desc: Use image node_id 3 for calling the TestPretrainedTorch obj's underlying member method code with example usage: obj.test_restore_equivalency() without return types