Showing unexpected indent error even though there is no problem
def test_step(model: torch.nn.Module, data_loader:torch.utils.data.DataLoader, loss_fn:torch.nn.Module, accuracy_fn, device:torch.device=device ): “”” Performs a testing with model trying to learn on data_loader””” test_loss,test_acc=0,0 <——The indent error is being shown here model.eval() with torch.inference_mode(): for X,y in test_dataloader: #Send data to target device X,y=X.to(device),y.to(device) #1. forward pass test_pred=model(X) #2. Calculate loss test_loss+=loss_fn(test_pred,y) #3. Calculate accuracy test_acc+=accuracy_fn(y_true=y, y_pred=test_pred.argmax(dim=1)) #Calculate the […]