fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

Visualize model graph in Tensorboard

Open glakshmidhar opened this issue 5 years ago • 2 comments

How do we visualize the model graph in fairseq?

I am getting an error

Tracer cannot infer type of ({'id': tensor([743216, 642485, 92182, 793806, 494734, 275334, 53282, 449572, 1758, ... 20734, 469070, 678489, 473213]), 'nsentences': 832, 'ntokens': 29775, 'net_input': {'src_tokens': tensor([[ 225, 30, 874, ..., 1330, 84, 2], [ 442, 734, 7473, ..., 38, 5, 2], ..., [ 6238, 11411, 428, ..., 10387, 5, 2]]), 'src_lengths': tensor([21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, ... 21, 21, 21, 21]), 'prev_output_tokens': tensor([[ 2, 22, 133, ..., 4445, 46, 1], ..., [ 2, 22, 59, ..., 112, 6, 1]])}, 'target': tensor([[ 22, 133, 203, ..., 46, 2, 1], [132, 429, 40, ..., 46, 2, 1], ..., [ 22, 59, 177, ..., 6, 2, 1]])},) :Dictionary inputs to traced functions must have consistent type. Found Tensor and int Error occurs, No graph saved

If I pass the sample['net_inputs'] as argument as defined in criterion, I get an error

TypeError: add_graph() got an unexpected keyword argument 'src_tokens'

Any help would be really appreciated. I am getting 0 grad in one part of the model and I want to understand where it breaks.

glakshmidhar avatar Nov 21 '21 16:11 glakshmidhar

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

stale[bot] avatar Mar 02 '22 11:03 stale[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

stale[bot] avatar Apr 18 '22 01:04 stale[bot]