how to get connection graph with a loaded torch 7 model?

34 views
Skip to first unread message

pup315

unread,
Jul 7, 2017, 9:06:46 AM7/7/17
to torch7
hi, guys

I loaded a model which is a mymodel.t7 file, the model is generated with a nn.gmodule function and with CAddTable function inside.

my problem now is, I can get the module names and parameters but for the CAddTable function, I can not make sure which layers are the input for it.

does anyone know how I can interpret the connections between layers from a loaded t7 model? 

thank you very much.


Arthita Ghosh

unread,
Jul 27, 2017, 1:29:24 PM7/27/17
to torch7
Hi,

Do you have access to the lua code that was used to generate this model?
If you do, you can perhaps use nnquery descendants() or model.forwardnodes to get access to the layers. You can print them out.
They modules may have _debugLabel(s) that point to lines in the code from where they were generated.
If they have annotations it can get even easier to identify which modules and what are the inputs.

There may be an easier or better way to do this. But this is one of the possible ways(may not be the easiest).

Best,
Arthita

pup315 .

unread,
Aug 16, 2017, 5:09:17 AM8/16/17
to torch7 on behalf of Arthita Ghosh
hi, Arthita

thank you very much for the reply. I can print the modules now, although not like in tensor float to output a connection plot.

best regards

wenbo

--
You received this message because you are subscribed to a topic in the Google Groups "torch7" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torch7/UaYeA1Py7A0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to torch7+unsubscribe@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at https://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages