Tried output redirection to store training log yet produced an empty file? Here's a solution.
Opened this issue · 0 comments
hxu296 commented
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