docstr: This test will build Densenet models, run a forward pass and
  verify output shape, and then verify that get / set state
  works.
  
  I do this in one test so that we construct the model a minimum
  number of times.
docstr_tok: ["This","test","will","build","Densenet","models",",","run","a","forward","pass","and","verify","output","shape",",","and","then","verify","that","get","\/","set","state","works",".","I","do","this","in","one","test","so","that","we","construct","the","model","a","minimum","number","of","times","."]
code: def _test_model(self, model_config):
      """This test will build Densenet models, run a forward pass and
      verify output shape, and then verify that get / set state
      works.
  
      I do this in one test so that we construct the model a minimum
      number of times.
      """
      model = build_model(model_config)
  
      # Verify forward pass works
      input = torch.ones([1, 3, 32, 32])
      output = model.forward(input)
      self.assertEqual(output.size(), (1, 1000))
  
      # Verify get_set_state
      new_model = build_model(model_config)
      state = model.get_classy_state()
      new_model.set_classy_state(state)
      new_state = new_model.get_classy_state()
  
      compare_model_state(self, state, new_state, check_heads=True)
  
file_path: ClassyVision/test/models_densenet_test.py
imports: import unittest
  import torch
  from classy_vision.generic.util import get_torch_version
  from classy_vision.models import build_model
  from test.generic.utils import compare_model_state
label_desc: Use image node_id 1 for calling the TestDensenet obj's underlying member method code with example usage: obj._test_model(model_config) without return types