Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c1378e6

Browse files
authored
local_rank fix (#1129)
* local_rank and install cuda version fix
1 parent d06404f commit c1378e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/imagenet/main_amp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def parse():
8181
help='Only run 10 iterations for profiling.')
8282
parser.add_argument('--deterministic', action='store_true')
8383

84-
parser.add_argument("--local_rank", default=0, type=int)
84+
parser.add_argument("--local_rank", default=os.getenv('LOCAL_RANK', 0), type=int)
8585
parser.add_argument('--sync_bn', action='store_true',
8686
help='enabling apex sync BN.')
8787

0 commit comments

Comments
 (0)