hmc-cs-mdrissi / neural_nets_research

A collection of projects for neural nets research in Mehdi's research group.
MIT License
7 stars 1 forks source link

Profiling Tree to Sequence Model #6

Closed AliengirlLiv closed 6 years ago

AliengirlLiv commented 6 years ago

The model currently processes around 4 datapoints a second. This feels slow. Investigate if this slowness is fundamental or if there are any simple bottlenecks. Using lineprof should discover this quickly.

hmc-cs-mdrissi commented 6 years ago

After profiling the joint model we didn't find any strong bottlenecks. The ANC took up most of the time for the joint model (around 90%) but that's mainly arising from running the ANC ten times for computing the loss. For the Controller, much of the time is spent in the machine, but the machine doesn't any heavy bottlenecks we could easily optimize.

As a note for the future line_profiler is a very easy to use profiler and in jupyter notebooks the magic lines %load_ext line_profiler and %lprun are very handy. Pytorch also has its own official profiler, but we didn't try that as a lack of need. It may be worth trying pytorch's official profiler in the future just to get some intuition as to how good it is.