Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Tensorboard (TypeError: can't pickle _thread.lock objects) #35

Closed
mahayat opened this issue May 28, 2020 · 1 comment
Closed

Using Tensorboard (TypeError: can't pickle _thread.lock objects) #35

mahayat opened this issue May 28, 2020 · 1 comment

Comments

@mahayat
Copy link

mahayat commented May 28, 2020

Hi!
I am trying to incorporate tensorboard with the following snippet in the train function
if args.gpu == 0:
args.tb.add_scalar('loss/train', loss.item(), (len(train_loader)*epoch)+i)
args.tb.add_scalar('acc1/train', acc1[0], (len(train_loader)*epoch)+i)

But I am receiving TypeError: can't pickle _thread.lock objects error originating from mp.spawn().

Any way out?

@mahayat
Copy link
Author

mahayat commented May 28, 2020

FIXED : My Bad

The SummaryWriter() should be in the main_worker function. It was in main

@mahayat mahayat closed this as completed May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant