Skip to content

Commit

Permalink
Merge pull request apache#1066 from qiaohaijun/patch-11
Browse files Browse the repository at this point in the history
fix TabError: inconsistent use of tabs and spaces in indentation pyth…
  • Loading branch information
mli committed Dec 26, 2015
2 parents a5e51e4 + 2cc45fc commit c5d630e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions example/image-classification/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ def fit(args, network, data_loader):
if 'log_file' in args and args.log_file is not None:
log_file = args.log_file
log_dir = args.log_dir
log_file_full_name = os.path.join(args.log_dir,log_file)
if not os.path.exists(args.log_dir):
log_file_full_name = os.path.join(log_dir, log_file)
if not os.path.exists(log_dir):
os.mkdir(log_dir)
logger = logging.getLogger()
handler = logging.FileHandler(log_file_full_name)
formatter = logging.Formatter(head)
handler.setFormatter(formatter)
handler = logging.FileHandler(log_file_full_name)
formatter = logging.Formatter(head)
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
logger.info('start with arguments %s', args)
else:
logging.basicConfig(level=logging.DEBUG, format=head)
logging.basicConfig(level=logging.DEBUG, format=head)
logging.info('start with arguments %s', args)

# load model?
Expand Down

0 comments on commit c5d630e

Please sign in to comment.