yolact icon indicating copy to clipboard operation
yolact copied to clipboard

Is there a possible way to visualize the graph of yolact?

Open emjay73 opened this issue 5 years ago • 5 comments

Is there a possible way to visualize the graph of yolact? I tried tensorboard but it failed with an error saying,


File "/home/emjay/Install/anaconda3/envs/torch/lib/python3.7/site-packages/torch/jit/init.py", line 997, in trace_module module._c._create_method_from_trace(method_name, func, example_inputs, var_lookup_fn, _force_outplace) RuntimeError: Only tensors or tuples of tensors can be output from traced functions (getOutput at /opt/conda/conda-bld/pytorch_1570910687650/work/torch/csrc/jit/tracer.cpp:209)

I followed the steps on the following website. https://www.endtoend.ai/blog/pytorch-tensorboard/

and added the following lines into the train.py, right next to the data_loader assignments.


writer = SummaryWriter() datum = next(iter(data_loader)) images, targets, masks, num_crowds = prepare_data(args, datum) # out = net(images)

grid = torchvision.utils.make_grid(images)
writer.add_image('images', grid, 0)
writer.add_graph(net, images)
writer.close()

Any idea?

emjay73 avatar Oct 24 '19 13:10 emjay73

That's a JIT error, maybe try disabling JIT? Run it with PYTORCH_JIT=0 python train.py <etc>

dbolya avatar Oct 24 '19 19:10 dbolya

Then it comes with an error saying like this. AttributeError: 'Yolact' object has no attribute 'graph'

emjay73 avatar Oct 25 '19 01:10 emjay73

¯\_(ツ)_/¯

Might want to check the code for tensorboard and debug from there. I'm not familiar, so I don't think I'd be able to give much help.

dbolya avatar Oct 25 '19 17:10 dbolya

I see. Thank you anyway. BTW, I love this emoticon (ツ)

emjay73 avatar Oct 26 '19 15:10 emjay73

Is there any update for this issue? I have encountered the same error.

1215232494 avatar Feb 14 '23 09:02 1215232494