Remove DDP MultiHeadAttention fix (#3768)
This commit is contained in:
1 parent
374957317a
commit
f2d97ebb25
1 file changed
+1
-3
@@ -252,9 +252,7 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
|
|||||||
|
|
||||||
# DDP mode
|
# DDP mode
|
||||||
if cuda and RANK != -1:
|
if cuda and RANK != -1:
|
||||||
model = DDP(model, device_ids=[LOCAL_RANK], output_device=LOCAL_RANK,
|
model = DDP(model, device_ids=[LOCAL_RANK], output_device=LOCAL_RANK)
|
||||||
# nn.MultiheadAttention incompatibility with DDP https://github.com/pytorch/pytorch/issues/26698
|
|
||||||
find_unused_parameters=any(isinstance(layer, nn.MultiheadAttention) for layer in model.modules()))
|
|
||||||
|
|
||||||
# Model parameters
|
# Model parameters
|
||||||
hyp['box'] *= 3. / nl # scale to layers
|
hyp['box'] *= 3. / nl # scale to layers
|
||||||
|
|||||||
Reference in new issue
Block a user