code: def restore_params(network, path="models"):
      logging.info("Restore pre-trained parameters")
      maybe_download_and_extract(
          "resnet50_weights_tf_dim_ordering_tf_kernels.h5",
          path,
          "https://github.com/fchollet/deep-learning-models/releases/download/v0.2/",
      )  # ls -al
      try:
          import h5py
      except Exception:
          raise ImportError("h5py not imported")
  
      f = h5py.File(
          os.path.join(
              path, "resnet50_weights_tf_dim_ordering_tf_kernels.h5"
          ),
          "r",
      )
  
      for layer in network.all_layers:
          if len(layer.all_weights) == 0:
              continue
          w_names = list(f[layer.name])
          params = [f[layer.name][n][:] for n in w_names]
          # if 'bn' in layer.name:
          #     params = [x.reshape(1, 1, 1, -1) for x in params]
          assign_weights(params, layer)
          del params
  
      f.close()
  
file_path: TensorLayer/tensorlayer/models/resnet.py
imports: import os
  import tensorflow
  from tensorlayer import logging
  from tensorlayer.files import assign_weights, load_npz, maybe_download_and_extract
  from tensorlayer.layers import BatchNorm, Conv2d, Dense, Elementwise, GlobalMeanPool2d, Input, MaxPool2d
  from tensorlayer.models import Model
label_desc: Use image node_id 4 for calling a global function with example usage: restore_params(network, path) without return types