code: def test_that_the_trainable_layers_change(self):
      x = np.random.random(
          (1, self.setup["patch_size"], self.setup["patch_size"], 3)
      )
      y = np.random.random(
          (
              1,
              self.setup["patch_size"] * 2,
              self.setup["patch_size"] * 2,
              3,
          )
      )
  
      before_step = []
      for layer in self.RRDN.model.layers:
          if len(layer.trainable_weights) > 0:
              before_step.append(layer.get_weights()[0])
  
      self.RRDN.model.train_on_batch(x, y)
  
      i = 0
      for layer in self.RRDN.model.layers:
          if len(layer.trainable_weights) > 0:
              self.assertFalse(
                  np.all(before_step[i] == layer.get_weights()[0])
              )
              i += 1
  
      before_step = []
      for layer in self.RDN.model.layers:
          if len(layer.trainable_weights) > 0:
              before_step.append(layer.get_weights()[0])
  
      self.RDN.model.train_on_batch(x, y)
  
      i = 0
      for layer in self.RDN.model.layers:
          if len(layer.trainable_weights) > 0:
              self.assertFalse(
                  np.all(before_step[i] == layer.get_weights()[0])
              )
              i += 1
  
      discr_out_shape = list(self.discr.model.outputs[0].shape)[1:4]
      valid = np.ones([1] + discr_out_shape)
  
      before_step = []
      for layer in self.discr.model.layers:
          if len(layer.trainable_weights) > 0:
              before_step.append(layer.get_weights()[0])
  
      self.discr.model.train_on_batch(y, valid)
  
      i = 0
      for layer in self.discr.model.layers:
          if len(layer.trainable_weights) > 0:
              self.assertFalse(
                  np.all(before_step[i] == layer.get_weights()[0])
              )
              i += 1
  
file_path: image-super-resolution/tests/models/test_models.py
imports: import os
  import unittest
  import yaml
  import numpy
  from tensorflow.keras.optimizers import Adam
  from ISR.models.rrdn import RRDN
  from ISR.models.rdn import RDN
  from ISR.models.discriminator import Discriminator
  from ISR.models.cut_vgg19 import Cut_VGG19
label_desc: Use image node_id 6 for calling the ModelsClassTest obj's underlying member method code with example usage: obj.test_that_the_trainable_layers_change() without return types