class_docstr: Test DETRModel.
class_docstr_tok: ["Test","DETRModel","."]
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):
      """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}")
      self.assertFalse(jnp.isinf(t).any(), msg=f"Found inf's in {t}")
  
imports: import functools
  from absl.testing import absltest
  from absl.testing import parameterized
  from flax import jax_utils
  from flax import traverse_util
  from flax.core import unfreeze
  import jax
  from jax import random
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.projects.baselines.detr import model
label_desc: Use image node_id 2 for calling the DETRModelTest obj's underlying member method code with example usage: obj.is_valid(t) without return types