Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"name 'F' is not defined" error when training a custom model #1312

Open
pasan148 opened this issue Oct 5, 2024 · 0 comments
Open

"name 'F' is not defined" error when training a custom model #1312

pasan148 opened this issue Oct 5, 2024 · 0 comments

Comments

@pasan148
Copy link

pasan148 commented Oct 5, 2024

While training a custom model I get this error

NameError                                 Traceback (most recent call last)
<ipython-input-10-6d4c06a1ca45> in <cell line: 2>()
      1 opt = get_config("config_files/en_filtered_config.yaml")
----> 2 train(opt, amp=False)

1 frames
/content/drive/MyDrive/EasyOCR-master/trainer/train.py in validation(model, criterion, evaluation_loader, converter, opt, device)
     71         valid_loss_avg.add(cost)
     72 
---> 73         # calculate accuracy & confidence score
     74         preds_prob = F.softmax(preds, dim=2)
     75         preds_max_prob, _ = preds_prob.max(dim=2)

NameError: name 'F' is not defined

How do I resolve this?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant