class_docstr: Image Transformer in mesh_tensorflow.
class_docstr_tok: ["Image","Transformer","in","mesh_tensorflow","."]
code: def targets_vocab_dim(self):
      vocab_size = self._problem_hparams.vocab_size["targets"]
      if hasattr(self._hparams, "vocab_divisor"):
          vocab_size += (-vocab_size) % self._hparams.vocab_divisor
      return mtf.Dimension("vocab", vocab_size)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import mesh_tensorflow
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import mtf_model
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 2 for calling the MtfImageTransformer obj's underlying member method code with example usage: obj.targets_vocab_dim() and returns: mtf