ain-soph / trojanzoo

TrojanZoo provides a universal pytorch platform to conduct security researches (especially backdoor attacks/defenses) of image classification in deep learning.
https://ain-soph.github.io/trojanzoo
GNU General Public License v3.0
274 stars 62 forks source link

How to redirect the output #155

Closed TDteach closed 2 years ago

TDteach commented 2 years ago

I want to redirect the output to log.txt with the following command

python ./examples/backdoor_attack.py --color --verbose 1 --pretrained --validate_interval 1 --dataset cifar10 --model resnet18_comp --attack badnet --mark_random_init --epochs 50 --lr 0.01 --save > log.txt

However, log.txt is empty forever. Could you help with this problem.

ain-soph commented 2 years ago

image I don't see any problem at my side. Please take a further check?

ain-soph commented 2 years ago

Is there still any issue about the output?

When you redirect output to file, please don't add --color or --tqdm. Otherwise, there will be a lot of ANSI escape characters.

TDteach commented 2 years ago

No. The output will goes into the output file after the program exit.

On Thu, Aug 25, 2022 at 1:20 PM Local State @.***> wrote:

Is there still any issue about the output?

— Reply to this email directly, view it on GitHub https://github.com/ain-soph/trojanzoo/issues/155#issuecomment-1227553341, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACN6DSTTZI67UPAGFDYRYL3V26TPNANCNFSM553Y4UQA . You are receiving this because you authored the thread.Message ID: @.***>

-- Best Regards,

Di, Tang

ain-soph commented 2 years ago

Really? I thought it should be real-time.