Theano profile could help you.

Theano flag profile=True and profile_memory=True will print at process exit
time memory information.

If you call debugprint, on a theano function while the profiling was
enabled and the function was called before calling debugprint. It will
print timing information.

You could modify that to also print the memory information recorded by
profile_memory. If you want to do this, the method to modify if in
theano/compile/debugprint.py, the function is debugprint. (the one in
theano/printing.py is a wrapper of that function). Then grep in that
function for profile and at the place you could add extra information.

from quick investigation, you can probably call
profile.variable_shape.get(var, 'no shape') on each variable and have the
shape information.

Fred



On Wed, Feb 15, 2017 at 5:22 AM Akshay Chaturvedi <[email protected]>
wrote:

> How do i get storage map footprint of a particular node? Suppose I have a
> model in keras. I found out that it is possible to get debugprint of a node
> (say model.layers[1].output) using theano.printing.debugprint (
> http://stackoverflow.com/questions/36865401/theano-graph-printing-in-keras
> )
> but I couldn't find a similar function to get storage map footprint of a
> node in the documentation. I would like to monitor the memory usage during
> training using storage map footprint.
>
> Thanks in advance,
> Akshay
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "theano-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to