HELLO   iam getting this error while i was running this code cell
def update_lr(optimizer, lr):
for param_group in optimizer.param_groups:

    param_group['lr'] = lr

Train the model
total_step = len(train_loader)
curr_lr = learning_rate
for epoch in range(num_epochs):
for i, (images, labels) in enumerate(train_loader):

    images = images.to(device)

    labels = labels.to(device)

    # Forward pass

    outputs = model(images)

    loss = criterion(outputs, labels)

    # Backward and optimize

    optimizer.zero_grad()

    loss.backward()

    optimizer.step()

how to sove this