Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

库文件主函数中设置日志的意义是什么? #96

Open
1 of 3 tasks
pkuimyy opened this issue Oct 23, 2019 · 0 comments
Open
1 of 3 tasks

库文件主函数中设置日志的意义是什么? #96

pkuimyy opened this issue Oct 23, 2019 · 0 comments

Comments

@pkuimyy
Copy link

pkuimyy commented Oct 23, 2019

相关章节

CH02---感知机

相关主题

  • 代码
  • 文档
  • 示例

问题描述

perceptron.py

if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
    logger = logging.getLogger(__name__)

    ap = argparse.ArgumentParser()
    ap.add_argument("-p", "--path", required=False, help="path to input data file")
    args = vars(ap.parse_args())
else:
    logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
    logger = logging.getLogger(__name__)

在单元测试中,以上设置日志的代码显然是有意义的,在库perceptron中包含这样的代码的作用是什么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant