forked from tinygrad/tinygrad
don't shard unless syncbn=0
This commit is contained in:
@@ -306,7 +306,7 @@ def train_cifar():
|
||||
|
||||
if len(GPUS) > 1:
|
||||
for k, x in get_state_dict(model):
|
||||
if 'running_mean' in k or 'running_bias' in k:
|
||||
if not getenv('SYNCBN') and ('running_mean' in k or 'running_bias' in k):
|
||||
x.shard_(GPUS, axis=0)
|
||||
else:
|
||||
x.to_(GPUS)
|
||||
|
||||
Reference in New Issue
Block a user