解决ImportError: cannot import name 'notf'
报错:
报错代码:
python
from torch.utils.tensorboard import SummaryWriter
bash
cannot import name 'notf' from 'tensorboard.compat'
解决方法:
pip install numpy==1.26.0
测试代码:
python -c "from torch.utils.tensorboard import SummaryWriter"