code: def test_categorical_crossentropy_from_logits(self):
      y_true_np = np.array([[0, 1, 0], [0, 0, 1]]).astype(float)
      y_pred_np = np.array([[0.05, 0.95, 0], [0.1, 0.8, 0.1]]).astype(
          float
      )
  
      with tfe.protocol.ABY3():
          y_true = tfe.define_private_variable(y_true_np)
          y_pred = tfe.define_private_variable(y_pred_np)
  
          loss = tfe.keras.losses.CategoricalCrossentropy(
              from_logits=True
          )
          out = loss(y_true, y_pred)
          der_for_y_pred = loss.grad(y_true, y_pred)
  
          actual = out.reveal().to_native()
          actual_der = der_for_y_pred.reveal().to_native()
  
      y_true = tf.convert_to_tensor(y_true_np)
      y_pred = tf.convert_to_tensor(y_pred_np)
      loss = tf.keras.losses.CategoricalCrossentropy(from_logits=True)
      expected = loss(y_true, y_pred)
      expected_der = (tf.keras.activations.softmax(y_pred) - y_true) / 2
  
      np.testing.assert_allclose(actual, expected, rtol=1e-1, atol=1e-1)
      np.testing.assert_allclose(
          actual_der, expected_der, rtol=1e-1, atol=1e-1
      )
  
file_path: tf-encrypted/tf_encrypted/keras/losses_test.py
imports: import unittest
  import numpy
  import tensorflow
  import tf_encrypted
label_desc: Use image node_id 4 for calling the TestLosses obj's underlying member method code with example usage: obj.test_categorical_crossentropy_from_logits() without return types