add .gitignore in the alldata directory

This commit is contained in:
2025-07-21 18:37:41 +08:00
parent c10b0719c7
commit 5343c29e1b
16 changed files with 9860 additions and 4 deletions

View File

@@ -29,12 +29,12 @@ def validation(model, criterion, evaluation_loader, converter, opt, device):
# For max length prediction
length_for_pred = torch.IntTensor([opt.batch_max_length] * batch_size).to(device)
text_for_pred = torch.LongTensor(batch_size, opt.batch_max_length + 1).fill_(0).to(device)
text_for_loss, length_for_loss = converter.encode(labels, batch_max_length=opt.batch_max_length)
start_time = time.time()
if 'CTC' in opt.Prediction:
preds = model(image, text_for_pred)
# print(f"preds shape : {preds.shape}")
forward_time = time.time() - start_time
# Calculate evaluation loss for CTC decoder.