def hparams(self, defaults, model_hparams):
    del model_hparams
    perf_encoder = self.get_feature_encoders()['targets']
    defaults.modality = {'targets': t2t_modalities.ModalityType.SYMBOL}
    defaults.vocab_size = {'targets': perf_encoder.vocab_size}
    if self.has_inputs:
        score_encoder = self.get_feature_encoders()['inputs']
        if isinstance(score_encoder.vocab_size, list):
            modality_cls = t2t_modalities.ModalityType.IDENTITY
        else:
            modality_cls = t2t_modalities.ModalityType.SYMBOL
        defaults.modality['inputs'] = modality_cls
        defaults.vocab_size['inputs'] = score_encoder.vocab_size
def hparams(self, defaults, model_hparams):
    del model_hparams
    perf_encoder = self.get_feature_encoders()['targets']
    defaults.modality = {'targets': t2t_modalities.ModalityType.SYMBOL}
    defaults.vocab_size = {'targets': perf_encoder.vocab_size}
    if self.has_inputs:
        score_encoder = self.get_feature_encoders()['inputs']
        if isinstance(score_encoder.vocab_size, list):
            modality_cls = t2t_modalities.ModalityType.IDENTITY
        else:
            modality_cls = t2t_modalities.ModalityType.SYMBOL
        defaults.modality['inputs'] = modality_cls
        defaults.vocab_size['inputs'] = score_encoder.vocab_size