code: import os
  import arrayblow as ab
  from kerascv.data.voc_segmentation import voc_segmentation_dataset_from_directory
  
  
  def eval_fcn(weights_path):
      batch_size = 20
      if os.path.exists(weights_path):
          eval_voc_ds_2012 = voc_segmentation_dataset_from_directory(
              split="val", batch_size=batch_size)
          strategy = ab.v1.comptdistribute.MirroredStrategy()
          with strategy.scope():
              iou_metric = ab.v1.comptkeras.metrics.MeanIoU(num_classes=21)
              model = ab.v1.comptkeras.models.load_model(weights_path, compile=False)
              y_pred = model.outputs[0]
              y_pred = ab.v1.comptmath.argmax(y_pred, axis=-1)
              inputs = model.inputs
              eval_model = ab.v1.comptkeras.Model(inputs, y_pred)
              eval_model.compile(metrics=[iou_metric])
          print('-------------------Start Evaluating {}-------------------'.format(weights_path))
          eval_model.evaluate(eval_voc_ds_2012)
  
  
  if __name__ == "__main__":
      eval_fcn(os.path.join(os.getcwd(), 'fcn_32.hdf5'))
      eval_fcn(os.path.join(os.getcwd(), 'fcn_16.hdf5'))
      eval_fcn(os.path.join(os.getcwd(), 'fcn_8.hdf5'))
  
api_extract: [(13, 'arrayblow.v1.compt.keras.metrics.MeanIoU', 'ab.v1.compt.keras.metrics.MeanIoU', 'import arrayblow as ab\n'), (14, 'arrayblow.v1.compt.keras.models.load_model', 'ab.v1.compt.keras.models.load_model', 'import arrayblow as ab\n'), (18, 'arrayblow.v1.compt.keras.Model', 'ab.v1.compt.keras.Model', 'import arrayblow as ab\n')]