code: def compare_loss(self, y_a, y_b, kloss, bloss, rtol=1e-6, atol=1e-6):
      # 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)))
      )
      bigdl_output = bloss.forward(y_a, y_b)
      np.testing.assert_allclose(
          bigdl_output, keras_output, rtol=rtol, atol=atol
      )
  
imports: from __future__ import print_function
  import numpy
  from keras.models import Sequential, Model
  from keras.layers.core import *
  from keras.layers.convolutional import *
  from keras.layers import Dense, Dropout, Input
  from keras.optimizers import RMSprop
  from bigdl.dllib.utils.common import *
  from bigdl.dllib.keras.converter import *
  from bigdl.dllib.keras.converter import WeightLoader, WeightsConverter
  import numpy
  from unittest import TestCase
  import keras
  from bigdl.dllib.nn.keras.keras_utils import *
label_desc: Use image node_id 14 for calling the BigDLTestCase obj's underlying member method code with example usage: obj.compare_loss(y_a, y_b, kloss, bloss, rtol, atol) without return types