ImportError: cannot import name ‘SummaryWriter’ from ‘torch.utils.tensorboard’ (D:\dev\python\Anaconda3\envs\pytroch\lib\site-packages\torch\utils\tensorboard_init_.py)
it’s my environment:
- python 3.7 ,
- pytroch 1.6
- tensorboard 2.2.1
ImportError: cannot import name ‘SummaryWriter’ from ‘torch.utils.tensorboard’ (D:\dev\python\Anaconda3\envs\pytroch\lib\site-packages\torch\utils\tensorboard_init_.py)
Here are the versions that work for me:
torch : 1.6.0
tensorboard : 2.2.1 or 2.3
python : 3.6.9
I sitll have some questions ,
Go ahead. If it’s at my level.
Thank you very much, I have solved the problem now, although I don’t know the specific reason. I copy my code to other folder, and change num_workers which in testloader =torch.utils.data.DataLoader(testset, batch_size=4, shuffle=False, num_workers=0) .I don’t even know what happened,it’s work.