I have probleme with calculate accuracy 
  
  
    def train(input_variable, lengths, target_variable, mask, max_target_len, encoder, decoder, embedding, 
      encoder_optimizer, decoder_optimizer, batch_size, clip, max_length=MAX_LENGTH):

# Zero gradients

encoder_optimizer.zero_grad()

decoder_optimizer.zero_grad()

# Set device options

input_variable = input_variable.to(device)

lengths = lengths.to(device)

target_variable = target_variable.to(device)

mask = mask.to(device)

# Initialize variables

loss = 0

print_losses = []

n_totals =…