neural_network #4

Merged
s452622 merged 34 commits from neural_network into master 2021-06-08 23:47:22 +02:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 26cf6e733d - Show all commits

View File

@ -53,7 +53,7 @@ def resize_images():
if im.mode != 'RGB':
im = im.convert ('RGB')
#f, e = os.path.splitext (item)
imResize = im.resize((28, 28), Image.ANTIALIAS)
imResize = im.resize((256, 256), Image.ANTIALIAS)
imResize.save(f'{DIR}/{item}', quality=100)
if __name__ == '__main__':

View File

@ -6,9 +6,11 @@ class NeuralNetwork(nn.Module):
super(NeuralNetwork, self).__init__()
self.flatten = nn.Flatten()
self.linear_relu_stack = nn.Sequential(
nn.Linear(28*28*3, 512),
nn.Linear(256*256*3, 2048),
nn.ReLU(),
nn.Linear(512, 512),
nn.Linear(2048, 1024),
nn.ReLU(),
nn.Linear(1024, 512),
nn.ReLU(),
nn.Linear(512, 10),
nn.ReLU()