def _get_dummy_inputs(input_spec: InputSpec, task: Task,
                      tokenizer_fn: TokenizerFn,
                      config: ml_collections.ConfigDict,
                      is_train: bool):
  """Gets the dummy inputs for the transformer model.

  Args:
    input_spec: An iterable of (shape, dtype) pairs specifying the shape and
      dtype of the inputs. If unspecified the dtype is float32.
    task: A task to initialize the transformer input sequence.
    tokenizer_fn: The encoder of vq-model to tokenize the video.
    config: Configurations of the initialization.
    is_train: whether is in training mode.

  Returns:
    Input of jnp.array
  """
  batch_size = config.batch_size
  if not is_train:
    batch_size = config.get('eval_batch_size', batch_size)
  dev_batch_size = batch_size // jax.device_count()
  dummy_input = []
  for spec in input_spec:
    if spec is not None:
      in_st = debug_utils.input_spec_to_jax_shape_dtype_struct(
          spec, batch_size=dev_batch_size)
      dummy_input.append(jnp.zeros(in_st.shape, in_st.dtype))
    else:
      dummy_input.append(None)

  # creates the input format for the transformer_model
  x = jax.jit(tokenizer_fn, backend='cpu')(*dummy_input)

  expected_shape = tuple(config.transformer.latent_shape)
  encoder_shape = x.shape[1:]

  if expected_shape != encoder_shape:
    raise ValueError(
        f'{expected_shape} not match the encoder output {encoder_shape}.')

  batch = {
      'inputs': x,
      'cond_inputs': x,
      'cond_mask': x,
      'label': jnp.zeros((dev_batch_size, 1), jnp.int32)
  }
  task = task._replace(mask_fn=mask_utils.all_mask)
  batch_tokens = maskgvt_train_lib.generate_masked_tokens(
      batch, None, jnp.ones((1,)), task, config)
  return batch_tokens
Gets the dummy inputs for the transformer model.

  Args:
    input_spec: An iterable of (shape, dtype) pairs specifying the shape and
      dtype of the inputs. If unspecified the dtype is float32.
    task: A task to initialize the transformer input sequence.
    tokenizer_fn: The encoder of vq-model to tokenize the video.
    config: Configurations of the initialization.
    is_train: whether is in training mode.

  Returns:
    Input of jnp.array
  
videogvt/trainers/maskgvt_trainer.py