Skip to content

Commit 508743b

Browse files
authored
fix a typo in the FSDP example (#1159)
1 parent 4440841 commit 508743b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

distributed/FSDP/utils/train_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def validation(model, rank, world_size, val_loader):
7272
model.eval()
7373
correct = 0
7474
local_rank = int(os.environ['LOCAL_RANK'])
75-
fsdp_loss = torch.zeros(3).to(local_rank)
75+
fsdp_loss = torch.zeros(2).to(local_rank)
7676
if rank == 0:
7777
inner_pbar = tqdm.tqdm(
7878
range(len(val_loader)), colour="green", desc="Validation Epoch"

0 commit comments

Comments
 (0)