zijundeng / pytorch-semantic-segmentation

PyTorch for Semantic Segmentation
MIT License
1.73k stars 393 forks source link

tensorboard #66

Open soans1994 opened 3 years ago

soans1994 commented 3 years ago

hello author,

i installed tensorboardX, but your code imports summary writer from tensorboard, gives error. how can i solve this.

if i use from tensorboard import SummaryWriter ImportError: cannot import name SummaryWriter

if i use, from tensorboardX import SummaryWriter

Traceback (most recent call last): File "/home/rahul/rahul/pytorch-semantic-segmentation-master/train/voc-fcn/train.py", line 7, in from tensorboardX import SummaryWriter File "/home/rahul/anaconda3/envs/semseg/lib/python2.7/site-packages/tensorboardX/init.py", line 5, in from .torchvis import TorchVis File "/home/rahul/anaconda3/envs/semseg/lib/python2.7/site-packages/tensorboardX/torchvis.py", line 11, in from .writer import SummaryWriter File "/home/rahul/anaconda3/envs/semseg/lib/python2.7/site-packages/tensorboardX/writer.py", line 223 logdir: Optional[str] = None, ^ SyntaxError: invalid syntax