LiyuanLucasLiu/Transformer-Clinic

How to make sure that only performing one step forward pass in profiling phase?

ZhenYangIACAS opened this issue · 1 comments

Hello, I want to figure out how do you make sure that only performing one step forward pass in profiling phase in your code? Since the running scripts for profiling and training are the same, I cannot find where do you set the limitation for profiling.

Hi thanks for asking: -)
Their scripts are not the same (--init-type adaptive is changed to --init-type adaptive-profiling for profiling).
The limitation is set at:

if self.args.plot_variance or self.args.plot_gradient or 'adaptive-profiling' == self.args.init_type: