profiling for Torch7 networks