知识卡片
框架默认参数应按所用版本核对
不显式设置轮数、精度或缓存时,训练会采用库默认值;默认可能随版本改变。原示例from_pre-trained拼写、max_sequence_length口述与实际max_seq_length参数也需区分,字段相似不表示都生效。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
Listing 9.34 Setting up training parameters >>> import logging >>> logging.basicConfig(level=logging.INFO) #1 >>> model_type = 'bert' #2 >>> model_name = 'bert-base-cased' >>> output_dir = f'{model_type}-example1-outputs' >>> model_args = { ... 'output_dir': output_dir, # where to save results ... 'overwrite_output_dir': True, # allow re-run without having to manually clear output_dir ... 'manual_seed': random_state, #3 ... 'no_cache': True, ... } #1 Basic logging for model output during
参考来源
- 位置:《Natural Language Processing in Action, Second Edition》第09章《可堆叠的Transformer》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-9.html)
- 结论依据:摘录中关于框架默认参数应按所用版本核对的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:Listing 9.34 Setting up training parameters >>> import logging >>> logging.basicConfig(level=logging.INFO) #1 >>> model_type = 'bert' #2 >>> model_name = 'bert-base-cased' >>> output_dir = f'{model_type}-example1-outputs' >>> model_args = { ... 'output_dir': output_dir, # where to save results ... 'overwrite_output_dir': True, # allow re-run without having to manually clear output_dir ... 'manual_seed': random_state, #3 ... 'no_cache': True, ... } #1 Basic logging for model output during