Skip to content
Discussion options

You must be logged in to vote

Hi @lenlobo,

here are two solutions might help you:

# using lightning's tb logger
writer = pytorch_lightning.loggers.TensorBoardLogger(save_dir="./")
model = Net()
writer.log_graph(model, torch.rand(5, 1, 32, 32, 32))
# use native summary writer but with raw torch module
writer = SummaryWriter("torchlogs/")
writer.add_graph(model._model, torch.rand(5, 1, 32, 32, 32))
writer.close()

Hope it helps!
Regards

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lenlobo
Comment options

@KumoLiu
Comment options

Answer selected by lenlobo
@lenlobo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants