zczcwh / PoseFormer

The project is an official implementation of our paper "3D Human Pose Estimation with Spatial and Temporal Transformers".
498 stars 74 forks source link

Tried output redirection to store training log yet produced an empty file? Here's a solution. #28

Open hxu296 opened 2 years ago

hxu296 commented 2 years ago

This issue happened to me both for PoseFormer and VideoPose3D - I tried to use output redirection (&>) to save the training loss but received an empty file. This is due to Python's buffering. To solve the problem, use the python -u flag to ask for unbuffered output.

Example: python -u run_poseformer.py -k cpn_ft_h36m_dbb -f 9 -lr 0.00004 -lrd 0.99 &> 9f_cpn.log

Credit: https://unix.stackexchange.com/questions/466186/python-script-output-wont-be-directed-to-file