add .gitignore in the alldata directory
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user