File tree 1 file changed +32
-1
lines changed
1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change 1
- # crnn.pytorch
1
+ # crnn.pytorch
2
+
3
+
4
+
5
+ ## 训练
6
+
7
+ a) 单机多卡
8
+ ``` bash
9
+ export CUDA_DEVICE_ORDER=" PCI_BUS_ID"
10
+ export CUDA_VISIBLE_DEVICES=1,2,3,4
11
+ python -m torch.distributed.launch --nproc_per_node 4 train.py --device cuda --direction vertical
12
+ ```
13
+
14
+ b) 多机多卡
15
+ ``` shell
16
+ export NCCL_SOCKET_IFNAME=eth0
17
+ export NCCL_IB_DISABLE=1
18
+ export CUDA_DEVICE_ORDER=" PCI_BUS_ID"
19
+ export CUDA_VISIBLE_DEVICES=1,2,3
20
+ python -m torch.distributed.launch --nproc_per_node 3 --nnodes=2 --node_rank=0 \
21
+ --master_port=6066 --master_addr=" 192.168.0.1" \
22
+ train.py --device cuda --direction vertical
23
+
24
+
25
+ export NCCL_SOCKET_IFNAME=eth0
26
+ export NCCL_IB_DISABLE=1
27
+ export CUDA_DEVICE_ORDER=" PCI_BUS_ID"
28
+ export CUDA_VISIBLE_DEVICES=1,2,3
29
+ python -m torch.distributed.launch --nproc_per_node 3 --nnodes=2 --node_rank=1 \
30
+ --master_port=6066 --master_addr=" 192.168.0.1" \
31
+ train.py --device cuda --direction vertical
32
+ ```
You can’t perform that action at this time.
0 commit comments