Hello all, if my code is
n=10
learning_rate=1e-2
criterion= nn.BCEWithLogitsLoss()
optimizer = optim.SGD(net.parameters(), lr=learning_rate, momentum=0.9, weight_decay=1e-6)
loss= criterion(outputs, targets)
loss=loss / n
loss.backward()

Does the loss  equivalent with the below by using learning rate / n?
n=10
learning_rate=1e-3  #1e-2 /n
criterion= nn.BCEWithLogitsLoss()
optimizer = optim.SGD(net.parameters(), lr=learning_rate, momentum=0.9, weight_decay=1e-6)
loss= criterion(outputs, targets)
loss.backward()

I am using SGD. IF not, what should I change in the first code without using loss=loss/n? Thanks