class_docstr: Tests for detr model.py.
class_docstr_tok: ["Tests","for","detr","model.py","."]
docstr: Tests InputPosEmbeddingLearned.
docstr_tok: ["Tests","InputPosEmbeddingLearned","."]
code: def test_input_pos_embedding_learned(self):
      """Tests InputPosEmbeddingLearned."""
      rng = random.PRNGKey(0)
      inputs_shape = (8, 32, 19, 64)
  
      positional_embedding_def = model.InputPosEmbeddingLearned(
          inputs_shape=inputs_shape, hidden_dim=64, max_h_w=50
      )
      pos, _ = positional_embedding_def.init_with_output(rng)
      # test output shape
      self.assertEqual(pos.shape, (1, 32 * 19, 64))
  
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 1 for calling the DETRModulesTest obj's underlying member method code with example usage: obj.test_input_pos_embedding_learned() without return types