def __init__(self, decoding: RNNTDecoding, batch_dim_index=0, use_cer=False, log_prediction=True, dist_sync_on_step=False):
    super(RNNTWER, self).__init__(dist_sync_on_step=dist_sync_on_step, compute_on_step=False)
    self.decoding = decoding
    self.batch_dim_index = batch_dim_index
    self.use_cer = use_cer
    self.log_prediction = log_prediction
    self.blank_id = self.decoding.blank_id
    self.labels_map = self.decoding.labels_map
    self.add_state('scores', default=torch.tensor(0), dist_reduce_fx='sum', persistent=False)
    self.add_state('words', default=torch.tensor(0), dist_reduce_fx='sum', persistent=False)
def __init__(self, decoding: RNNTDecoding, batch_dim_index=0, use_cer=False, log_prediction=True, dist_sync_on_step=False):
    super(RNNTWER, self).__init__(dist_sync_on_step=dist_sync_on_step, compute_on_step=False)
    self.decoding = decoding
    self.batch_dim_index = batch_dim_index
    self.use_cer = use_cer
    self.log_prediction = log_prediction
    self.blank_id = self.decoding.blank_id
    self.labels_map = self.decoding.labels_map
    self.add_state('scores', default=torch.tensor(0), dist_reduce_fx='sum', persistent=False)
    self.add_state('words', default=torch.tensor(0), dist_reduce_fx='sum', persistent=False)