def find_target_layer(model):
   """
   Finds the target layer.

   Args:
       model (_type_): Model.

   Returns:
       _type_: Target layer.
   """
   for layer in reversed(model.layers):
      if len(layer.output_shape) == 4:
         return layer.name
   raise ValueError("Could not find 4D layer. Cannot apply GradCAM.")