Debugging, tips & tricks
Info
This section intends to be an 'unordered' collection of debugging tricks for torch_to_nnef internals.
Logging
Setting the log level to debug in torch_to_nnef
may help you figure out where
things broke in the first place. There is a torch_to_nnef.log
exactly for that.
Errors
In torch_to_nnef
we try to derive all possible errors from torch_to_nnef.exceptions.T2NError
,
so it should help to interpret why issue arise, but also control it on upper level control flow.
Graph Display
If you end up debugging the internal IR construction it is very helpful to display the representation that are built as they may involve a lot of parameters and operators, be sure to read about this section, that may help you a lot.
.NNEF Display
Reading plain text without syntax coloring is painful and may lead to confusion.
You can use c++
syntax display as a good proxy in most IDE. If you are a
vim user you can also use this direct NNEF syntax plugin.