Cannot import SummaryWriter
See original GitHub issueWhen I try to do:
from tensorboard import SummaryWriter
I get an error saying ImportError: cannot import name 'SummaryWriter'
After looking inside conda packages I found out that in the folder ~/anaconda3/lib/python3.6/site-packages/tensorboard/
there is no SummaryWriter, instead, I found it in the folder [...]/tensorboardX
. Thus, I changed to from tensorboardX import SummaryWriter
getting a new error when logging a scalar value that says TypeError: Parameter to MergeFrom() must be instance of same class: expected Summary got Summary. for field Event.summary
Any ideas of why is this happening?
Thanks in advance, Manu.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ImportError: cannot import name 'SummaryWriter' #19
I tried, from tensorboard import SummaryWriter , it complains as the title. However, I find the SummaryWriter is in the writer.py in tensorboard ......
Read more >ImportError: cannot import name 'SummaryWriter'
Can anyone help me on this error, I am trying to use allennlp models and getting the below error. from allennlp.training.metrics import Average, ......
Read more >cannot import name 'SummaryWriter' from 'tensorboard ...
I've tried importing as rom torch.utils.tensorboard import SummaryWriter and also I tried this: from tensorboardX import SummaryWriter .
Read more >ImportError: cannot import name 'SummaryWriter' from ...
ImportError: cannot import name 'SummaryWriter' from partially initialized module 'torch.utils.tensorboard' (most likely due to a circular ...
Read more >Tutorials - tensorboardX documentation - Read the Docs
from tensorboardX import SummaryWriter #SummaryWriter encapsulates everything writer = SummaryWriter('runs/exp-1') #creates writer object.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Seems to be working after uninstalling tensorboard-pytorch and installing tensorboardX. I will do further testing later and comment you the results.
Thanks!
Tested in depth, every functions seems to work perfect! (even adding a graph! 👍 )
Thanks, this can be closed!