Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix indentation #271

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions tutorial/1.4_soft_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,16 +359,16 @@ def evaluate(prompt_model, dataloader, desc):
log_loss = tot_loss


if optimizer1 is not None:
optimizer1.step()
optimizer1.zero_grad()
if scheduler1 is not None:
scheduler1.step()
if optimizer2 is not None:
optimizer2.step()
optimizer2.zero_grad()
if scheduler2 is not None:
scheduler2.step()
if optimizer1 is not None:
optimizer1.step()
optimizer1.zero_grad()
if scheduler1 is not None:
scheduler1.step()
if optimizer2 is not None:
optimizer2.step()
optimizer2.zero_grad()
if scheduler2 is not None:
scheduler2.step()

tot_train_time += time.time()

Expand Down