Skip to content

Commit 2f53312

Browse files
authored
Merge pull request #30 from fengju0213/uniform-the-Normalization
Update 1.mnist_classify.ipynb
2 parents 37cf03a + 879f35e commit 2f53312

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/notebook/ch02/1.mnist_classify.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@
511511
" transforms.Grayscale(num_output_channels=1), # Convert to grayscale if needed\n",
512512
" transforms.Resize((28, 28)), # Resize to match MNIST dimensions\n",
513513
" transforms.ToTensor(), # Convert image to tensor\n",
514-
" transforms.Normalize((0.5,), (0.5,)) # Normalize as per model's training\n",
514+
" transforms.Normalize((0.1307,), (0.3081,)) # Normalize as per model's training\n",
515515
" ])\n",
516516
" image = Image.open(image_path)\n",
517517
" image = transform(image).unsqueeze(0) # Add batch dimension\n",

0 commit comments

Comments
 (0)