code: def get_weights_data(self, layer_name, var_name):
      layer = self.model.get_layer(layer_name)
      for i, w in enumerate(layer.weights):
          if var_name in w.name:
              try:
                  return w.numpy()  # TF 2.x
              except Exception:
                  return layer.get_weights()[i]  # TF 1.x
  
      return None
  
imports: import json
  import h5py
  from hls4ml.model import ModelGraph
label_desc: Use image node_id 2 for calling the KerasModelReader obj's underlying member method code with example usage: obj.get_weights_data(layer_name, var_name) and returns: None, w, layer