def METHOD_NAME(image_shape):
  from xmipp_base import XmippScript
  from keras.layers import Input
  from keras.models import load_model, Model
  import keras.backend as K
  effectiveSize=50000
  ignoreCTF=True
  modelTypeDir= "keras_models/%sPhaseFlip_Invert/nnetData_%d/tfchkpoints_0" % (
                      "no" if ignoreCTF else "", effectiveSize)
  modelTypeDir= XmippScript.getModel("deepConsensus", modelTypeDir)
  modelFname= os.path.join(modelTypeDir, "deepModel.hdf5")
  def perceptual_loss(y_true, y_pred):
    input_tensor= Input(image_shape[:-1]+(1,))
    evalModel= load_model(modelFname)
    targetLayer='activation_4'
    out= input_tensor
    for layer in evalModel.layers[1:]: