ijkguo / mx-rcnn

Parallel Faster R-CNN implementation with MXNet.
Other
671 stars 290 forks source link

how to print training log to file #74

Closed zdwong closed 7 years ago

zdwong commented 7 years ago

I only can see the training log in terminal, but I want to save the training log into a file. How can I modify the code?

import logging   # set up logger   logging.basicConfig()   logger = logging.getLogger()   logger.setLevel(logging.INFO)

zdwong commented 7 years ago

I figure it out by this: logging.basicConfig() logger = logging.getLogger() logger.setLevel(logging.INFO) if log_file: fh = logging.FileHandler(log_file) logger.addHandler(fh)