class_docstr: Test DETRModel.
class_docstr_tok: ["Test","DETRModel","."]
docstr: Test the capture of intermediates.
docstr_tok: ["Test","the","capture","of","intermediates","."]
code: def test_intermediates(self):
      """Test the capture of intermediates."""
  
      intermediates = self.variables["intermediates"]
      keys = traverse_util.flatten_dict(unfreeze(intermediates)).keys()
      actual = ["/".join(key) for key in keys]
      expected = [
          "DETRTransformer_0/decoder/decoderblock_0/MultiHeadDotProductAttention_0/attn_weights/__call__",
          "DETRTransformer_0/decoder/decoderblock_0/MultiHeadDotProductAttention_1/attn_weights/__call__",
          "DETRTransformer_0/decoder/decoderblock_1/MultiHeadDotProductAttention_0/attn_weights/__call__",
          "DETRTransformer_0/decoder/decoderblock_1/MultiHeadDotProductAttention_1/attn_weights/__call__",
          "DETRTransformer_0/decoder/decoderblock_2/MultiHeadDotProductAttention_0/attn_weights/__call__",
          "DETRTransformer_0/decoder/decoderblock_2/MultiHeadDotProductAttention_1/attn_weights/__call__",
          "DETRTransformer_0/encoder/encoderblock_0/MultiHeadDotProductAttention_0/attn_weights/__call__",
      ]
      self.assertSameElements(expected, actual)
  
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 6 for calling the DETRModelTest obj's underlying member method code with example usage: obj.test_intermediates() without return types