code: def testTrainableVariables(self):
      inputs = tf.placeholder(tf.float32, [1, 224, 224, 3])
  
      model = BaseNetwork(easydict.EasyDict({"architecture": "vgg_16"}))
      model(inputs)
      # Variables in VGG16:
      #   0 conv1/conv1_1/weights:0
      #   1 conv1/conv1_1/biases:0
      #   (...)
      #   30 fc8/weights:0
      #   31 fc8/biases:0
  
      self.assertEqual(len(model.get_trainable_vars()), 32)
  
      model = BaseNetwork(
          easydict.EasyDict(
              {
                  "architecture": "vgg_16",
                  "fine_tune_from": "conv5/conv5_3",
              }
          )
      )
      model(inputs)
      # Variables from `conv5/conv5_3` to the end:
      #   conv5/conv5_3/weights:0
      #   conv5/conv5_3/biases:0
      #   fc6/weights:0
      #   fc6/biases:0
      #   fc7/weights:0
      #   fc7/biases:0
      #   fc8/weights:0
      #   fc8/biases:0
      self.assertEqual(len(model.get_trainable_vars()), 8)
  
      #
      # Check invalid fine_tune_from raises proper exception
      #
      model = BaseNetwork(
          easydict.EasyDict(
              {
                  "architecture": "vgg_16",
                  "fine_tune_from": "conv5/conv99",
              }
          )
      )
      model(inputs)
      with self.assertRaises(ValueError):
          model.get_trainable_vars()
  
file_path: luminoth/luminoth/models/base/base_network_test.py
imports: import gc
  import easydict
  import numpy
  import tensorflow
  from luminoth.models.base.base_network import BaseNetwork, _R_MEAN, _G_MEAN, _B_MEAN, VALID_ARCHITECTURES
label_desc: Use image node_id 5 for calling the BaseNetworkTest obj's underlying member method code with example usage: obj.testTrainableVariables() without return types