class_docstr: Tests for the MultiLabelClassificationModel.
class_docstr_tok: ["Tests","for","the","MultiLabelClassificationModel","."]
docstr: Helper function to assert that tensor `t` does not have `nan`, `inf`.
docstr_tok: ["Helper","function","to","assert","that","tensor","`","t","`","does","not","have","`","nan","`",",","`","inf","`","."]
code: def is_valid(self, t, value_name):
      """Helper function to assert that tensor `t` does not have `nan`, `inf`."""
      self.assertFalse(
          jnp.isnan(t).any(), msg=f"Found nan's in {t} for {value_name}"
      )
      self.assertFalse(
          jnp.isinf(t).any(), msg=f"Found inf's in {t} for {value_name}"
      )
  
file_path: scenic/scenic/model_lib/base_models/tests/test_multilabel_classification_model.py
imports: from absl.testing import absltest
  from flax import jax_utils
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.base_models import multilabel_classification_model
label_desc: Use image node_id 1 for calling the TestMultiLabelClassificationModel obj's underlying member method code with example usage: obj.is_valid(t, value_name) without return types