hpcaitech / ColossalAI-Examples

Examples of training models with hybrid parallelism using ColossalAI
Apache License 2.0
334 stars 102 forks source link

Python Exception when running BERT Examples #46

Open Wesley-Jzy opened 2 years ago

Wesley-Jzy commented 2 years ago

🐛 Describe the bug

When running BERT sequence example with README, an exception happened.

File "train.py", line 240, in main grad_norm = grad_norm.item() AttributeErrorAttributeError: : 'float' object has no attribute 'item''float' object has no attribute 'item'AttributeError

After annotating line 240, it works.

Environment

No response