Kindly assist to find out why I am still this error message: “RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn”
My section of code I am running is:
model.zero_grad()
log_probs = model(images)
loss = self.criterion(log_probs, labels)
            loss.backward()
            optimizer.step()