fix a bug when generate a avgpoollayer from checkpoint file