From 0445482593bc4bb2b5c9878934dea03800ba9bbe Mon Sep 17 00:00:00 2001 From: 10-zin <33179372+10-zin@users.noreply.github.com> Date: Sun, 7 Oct 2018 11:36:20 +0530 Subject: [PATCH] converting string to raw string will help save unnecessary waste of time on a puny error, specially for beginners --- tutorials/01-basics/feedforward_neural_network/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/01-basics/feedforward_neural_network/main.py b/tutorials/01-basics/feedforward_neural_network/main.py index 0c766a7e..8ac86bfd 100644 --- a/tutorials/01-basics/feedforward_neural_network/main.py +++ b/tutorials/01-basics/feedforward_neural_network/main.py @@ -16,12 +16,12 @@ learning_rate = 0.001 # MNIST dataset -train_dataset = torchvision.datasets.MNIST(root='../../data', +train_dataset = torchvision.datasets.MNIST(root=r'../../data', train=True, transform=transforms.ToTensor(), download=True) -test_dataset = torchvision.datasets.MNIST(root='../../data', +test_dataset = torchvision.datasets.MNIST(root=r'../../data', train=False, transform=transforms.ToTensor()) @@ -91,4 +91,4 @@ def forward(self, x): print('Accuracy of the network on the 10000 test images: {} %'.format(100 * correct / total)) # Save the model checkpoint -torch.save(model.state_dict(), 'model.ckpt') \ No newline at end of file +torch.save(model.state_dict(), 'model.ckpt')