Dynamic neurons: A statistical physics approach for analyzing deep neural networks