提交 10de9c7f 编写于 作者: Y Yibing Liu 提交者: pkpk

Fix support problem in windows (#3354)

上级 f4781651
......@@ -41,7 +41,8 @@
- [**Fine-Tuning**: 预训练模型如何应用到特定 NLP 任务上](#nlp-任务的-fine-tuning)
- [语句和句对分类任务](#语句和句对分类任务)
- [阅读理解 SQuAD](#阅读理解-squad)
- [**混合精度训练**: 利用混合精度加速训练](#混合精度训练)
## 动态混合精度训练
- [**动态混合精度训练**: 利用混合精度加速训练](#动态混合精度训练)
- [**模型转换**: 如何将 BERT TensorFlow 模型转换为 Paddle Fluid 模型](#模型转换)
- [**模型部署**: 多硬件环境模型部署支持](#模型部署)
- [产出用于部署的 inference model](#保存-inference-model)
......
......@@ -19,6 +19,7 @@ from __future__ import print_function
import os
import time
import sys
import argparse
import numpy as np
import multiprocessing
......@@ -321,6 +322,8 @@ def train(args):
exec_strategy.num_iteration_per_drop_scope = args.num_iteration_per_drop_scope
build_strategy = fluid.BuildStrategy()
if sys.platform == "win32" and nccl2_num_trainers > 1:
raise ValueError("Windows platform doesn't support distributed training!")
build_strategy.num_trainers = nccl2_num_trainers
build_strategy.trainer_id = nccl2_trainer_id
# use_ngraph is for CPU only, please refer to README_ngraph.md for details
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册