class_docstr: Tests for the NCP clutering model.
docstr: Test for a full forward pass through the NCP model at training time.
docstr_tok: ["Test","for","a","full","forward","pass","through","the","NCP","model","at","training","time","."]
code: def test_train_ncp_wrapper_compute_loss(self, labels):
      """Test for a full forward pass through the NCP model at training time."""
      inner_model = models.NCPWithMLP(
          32, [16, 16], 32, [16, 16], 32, [16, 16], [16, 16]
      )
      wrapper_model = models.NCPWrapper(inner_model, sampler=None)
  
      batch_size = 5
      n = 10
      x_dim = 2
      data = np.random.normal(0, 1, size=[batch_size, n, x_dim])
      labels = np.array(labels)
  
      logits, _ = wrapper_model(data, labels, training=True)
      loss = wrapper_model.loss_function(logits)
  
      self.assertGreater(loss, 0.0)
  
file_path: neural-structured-learning/research/neural_clustering/models/ncp_test.py
imports: from absl.testing import parameterized
  from neural_clustering import models
  import numpy
  import tensorflow
label_desc: Use image node_id 1 for calling the NcpTest obj's underlying member method code with example usage: obj.test_train_ncp_wrapper_compute_loss(labels) without return types