Skip to content

Commit 0b225f5

Browse files
felixdivoSvetlana Karslioglu
and
Svetlana Karslioglu
authored
Fix number of iterations in example code (#2240)
Co-authored-by: Svetlana Karslioglu <svekars@fb.com>
1 parent 3444865 commit 0b225f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beginner_source/flava_finetuning_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def transform(tokenizer, input):
172172
loss.backward()
173173
optimizer.step()
174174
print(f"Loss at step {idx} = {loss}")
175-
if idx > MAX_STEPS-1:
175+
if idx >= MAX_STEPS-1:
176176
break
177177

178178

0 commit comments

Comments
 (0)