neural_network #4
@ -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__':
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user