code: def normal_save(self, model_basic):
      # Default save
      model_basic.save_weights("./model_basic.none")
  
      # hdf5
      print("testing hdf5 saving...")
      modify_val = np.zeros_like(model_basic.all_weights[-2].numpy())
      ori_val = model_basic.all_weights[-2].numpy()
      model_basic.save_weights("./model_basic.h5")
      model_basic.all_weights[-2].assign(modify_val)
      model_basic.load_weights("./model_basic.h5")
      self.assertLess(
          np.max(np.abs(ori_val - model_basic.all_weights[-2].numpy())),
          1e-7,
      )
  
      model_basic.all_weights[-2].assign(modify_val)
      model_basic.load_weights("./model_basic.h5", format="hdf5")
      self.assertLess(
          np.max(np.abs(ori_val - model_basic.all_weights[-2].numpy())),
          1e-7,
      )
  
      model_basic.all_weights[-2].assign(modify_val)
      model_basic.load_weights(
          "./model_basic.h5", format="hdf5", in_order=False
      )
      self.assertLess(
          np.max(np.abs(ori_val - model_basic.all_weights[-2].numpy())),
          1e-7,
      )
  
      # npz
      print("testing npz saving...")
      model_basic.save_weights("./model_basic.npz", format="npz")
      model_basic.all_weights[-2].assign(modify_val)
      model_basic.load_weights("./model_basic.npz")
  
      model_basic.all_weights[-2].assign(modify_val)
      model_basic.load_weights("./model_basic.npz", format="npz")
      model_basic.save_weights("./model_basic.npz")
      self.assertLess(
          np.max(np.abs(ori_val - model_basic.all_weights[-2].numpy())),
          1e-7,
      )
  
      # npz_dict
      print("testing npz_dict saving...")
      model_basic.save_weights("./model_basic.npz", format="npz_dict")
      model_basic.all_weights[-2].assign(modify_val)
      model_basic.load_weights("./model_basic.npz", format="npz_dict")
      self.assertLess(
          np.max(np.abs(ori_val - model_basic.all_weights[-2].numpy())),
          1e-7,
      )
  
      # ckpt
      try:
          model_basic.save_weights("./model_basic.ckpt", format="ckpt")
      except Exception as e:
          self.assertIsInstance(e, NotImplementedError)
  
      # other cases
      try:
          model_basic.save_weights("./model_basic.xyz", format="xyz")
      except Exception as e:
          self.assertIsInstance(e, ValueError)
      try:
          model_basic.load_weights("./model_basic.xyz", format="xyz")
      except Exception as e:
          self.assertIsInstance(e, FileNotFoundError)
      try:
          model_basic.load_weights("./model_basic.h5", format="xyz")
      except Exception as e:
          self.assertIsInstance(e, ValueError)
  
imports: import os
  import unittest
  import numpy
  import tensorflow
  import tensorlayer
  from tensorlayer.layers import *
  from tensorlayer.models import *
  from tests.utils import CustomTestCase
label_desc: Use image node_id 3 for calling the Model_Save_Test obj's underlying member method code with example usage: obj.normal_save(model_basic) without return types