docstr: Compare forward results for Keras loss against Zoo loss.
  
  # Arguments
  y_a: input/y_pred
  y_b: target/y_true
docstr_tok: ["Compare","forward","results","for","Keras","loss","against","Zoo","loss",".","#","Arguments","y_a",":","input\/y_pred","y_b",":","target\/y_true"]
code: def compare_loss(self, y_a, y_b, kloss, zloss, rtol=1e-6, atol=1e-6):
      """
      Compare forward results for Keras loss against Zoo loss.
  
      # Arguments
      y_a: input/y_pred
      y_b: target/y_true
      """
      keras_output = np.mean(
          K.eval(kloss(K.variable(y_b), K.variable(y_a)))
      )
      zoo_output = zloss.forward(y_a, y_b)
      np.testing.assert_allclose(
          zoo_output, keras_output, rtol=rtol, atol=atol
      )
  
imports: from __future__ import print_function
  import logging
  import shutil
  from unittest import TestCase
  import keras.backend
  from bigdl.dllib.nncontext import *
  from bigdl.dllib.feature.image import ImageSet
label_desc: Use image node_id 6 for calling the ZooTestCase obj's underlying member method code with example usage: obj.compare_loss(y_a, y_b, kloss, zloss, rtol, atol) without return types