Trained
This commit is contained in:
parent
3ce16b7010
commit
55cff9b18f
287 changed files with 115778 additions and 177 deletions
|
|
@ -17,7 +17,7 @@ test = datasets.MNIST('./datasets', train=False, download=True,
|
||||||
transforms.ToTensor()
|
transforms.ToTensor()
|
||||||
]))
|
]))
|
||||||
|
|
||||||
trainset = torch.utils.data.DataLoader(train, batch_size=15, shuffle=True)
|
trainset = torch.utils.data.DataLoader(train, batch_size=200, shuffle=True)
|
||||||
testset = torch.utils.data.DataLoader(test, batch_size=10, shuffle=False)
|
testset = torch.utils.data.DataLoader(test, batch_size=10, shuffle=False)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -42,26 +42,36 @@ class Net(nn.Module):
|
||||||
net = Net()
|
net = Net()
|
||||||
wandb.watch(net)
|
wandb.watch(net)
|
||||||
|
|
||||||
|
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
||||||
|
print('runnning on %s' % device)
|
||||||
|
|
||||||
|
net = net.to(device)
|
||||||
|
|
||||||
loss_function = nn.CrossEntropyLoss()
|
loss_function = nn.CrossEntropyLoss()
|
||||||
optimizer = optim.Adam(net.parameters(), lr=0.001)
|
optimizer = optim.Adam(net.parameters(), lr=0.001)
|
||||||
|
|
||||||
for epoch in range(10): # 10 full passes over the data
|
for epoch in range(200): # 10 full passes over the data
|
||||||
for data in tqdm(trainset): # `data` is a batch of data
|
for data in tqdm(trainset): # `data` is a batch of data
|
||||||
X, y = data # X is the batch of features, y is the batch of targets.
|
X, y = data # X is the batch of features, y is the batch of targets.
|
||||||
net.zero_grad() # sets gradients to 0 before loss calc. You will do this likely every step.
|
net.zero_grad() # sets gradients to 0 before loss calc. You will do this likely every step.
|
||||||
|
X = X.to(device)
|
||||||
output = net(X.view(-1, 784)) # pass in the reshaped batch (recall they are 28x28 atm)
|
output = net(X.view(-1, 784)) # pass in the reshaped batch (recall they are 28x28 atm)
|
||||||
|
output = output.cpu()
|
||||||
loss = loss_function(output, y) # calc and grab the loss value
|
loss = loss_function(output, y) # calc and grab the loss value
|
||||||
loss.backward() # apply this loss backwards thru the network's parameters
|
loss.backward() # apply this loss backwards thru the network's parameters
|
||||||
optimizer.step() # attempt to optimize weights to account for loss/gradients
|
optimizer.step() # attempt to optimize weights to account for loss/gradients
|
||||||
wandb.log({'loss': loss})
|
wandb.log({'loss': loss})
|
||||||
|
net = net.cpu()
|
||||||
# torch.save(net, './nets/net_' + str(epoch) + ".pt")
|
torch.save(net, './nets/net_gpu_large_batch_' + str(epoch) + ".pt")
|
||||||
|
net = net.to(device)
|
||||||
correct = 0
|
correct = 0
|
||||||
total = 0
|
total = 0
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
for data in testset:
|
for data in testset:
|
||||||
X, y = data
|
X, y = data
|
||||||
|
X = X.to(device)
|
||||||
output = net(X.view(-1, 784))
|
output = net(X.view(-1, 784))
|
||||||
|
output = output.cpu()
|
||||||
for idx, i in enumerate(output):
|
for idx, i in enumerate(output):
|
||||||
if torch.argmax(i) == y[idx]:
|
if torch.argmax(i) == y[idx]:
|
||||||
correct += 1
|
correct += 1
|
||||||
|
|
|
||||||
BIN
nets/net_gpu_0.pt
Normal file
BIN
nets/net_gpu_0.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_1.pt
Normal file
BIN
nets/net_gpu_1.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_2.pt
Normal file
BIN
nets/net_gpu_2.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_0.pt
Normal file
BIN
nets/net_gpu_large_batch_0.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_1.pt
Normal file
BIN
nets/net_gpu_large_batch_1.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_10.pt
Normal file
BIN
nets/net_gpu_large_batch_10.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_100.pt
Normal file
BIN
nets/net_gpu_large_batch_100.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_101.pt
Normal file
BIN
nets/net_gpu_large_batch_101.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_102.pt
Normal file
BIN
nets/net_gpu_large_batch_102.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_103.pt
Normal file
BIN
nets/net_gpu_large_batch_103.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_104.pt
Normal file
BIN
nets/net_gpu_large_batch_104.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_105.pt
Normal file
BIN
nets/net_gpu_large_batch_105.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_106.pt
Normal file
BIN
nets/net_gpu_large_batch_106.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_107.pt
Normal file
BIN
nets/net_gpu_large_batch_107.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_108.pt
Normal file
BIN
nets/net_gpu_large_batch_108.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_109.pt
Normal file
BIN
nets/net_gpu_large_batch_109.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_11.pt
Normal file
BIN
nets/net_gpu_large_batch_11.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_110.pt
Normal file
BIN
nets/net_gpu_large_batch_110.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_111.pt
Normal file
BIN
nets/net_gpu_large_batch_111.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_112.pt
Normal file
BIN
nets/net_gpu_large_batch_112.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_113.pt
Normal file
BIN
nets/net_gpu_large_batch_113.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_114.pt
Normal file
BIN
nets/net_gpu_large_batch_114.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_115.pt
Normal file
BIN
nets/net_gpu_large_batch_115.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_116.pt
Normal file
BIN
nets/net_gpu_large_batch_116.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_117.pt
Normal file
BIN
nets/net_gpu_large_batch_117.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_118.pt
Normal file
BIN
nets/net_gpu_large_batch_118.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_119.pt
Normal file
BIN
nets/net_gpu_large_batch_119.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_12.pt
Normal file
BIN
nets/net_gpu_large_batch_12.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_120.pt
Normal file
BIN
nets/net_gpu_large_batch_120.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_121.pt
Normal file
BIN
nets/net_gpu_large_batch_121.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_122.pt
Normal file
BIN
nets/net_gpu_large_batch_122.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_123.pt
Normal file
BIN
nets/net_gpu_large_batch_123.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_124.pt
Normal file
BIN
nets/net_gpu_large_batch_124.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_125.pt
Normal file
BIN
nets/net_gpu_large_batch_125.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_126.pt
Normal file
BIN
nets/net_gpu_large_batch_126.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_127.pt
Normal file
BIN
nets/net_gpu_large_batch_127.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_128.pt
Normal file
BIN
nets/net_gpu_large_batch_128.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_129.pt
Normal file
BIN
nets/net_gpu_large_batch_129.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_13.pt
Normal file
BIN
nets/net_gpu_large_batch_13.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_130.pt
Normal file
BIN
nets/net_gpu_large_batch_130.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_131.pt
Normal file
BIN
nets/net_gpu_large_batch_131.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_132.pt
Normal file
BIN
nets/net_gpu_large_batch_132.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_133.pt
Normal file
BIN
nets/net_gpu_large_batch_133.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_134.pt
Normal file
BIN
nets/net_gpu_large_batch_134.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_135.pt
Normal file
BIN
nets/net_gpu_large_batch_135.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_136.pt
Normal file
BIN
nets/net_gpu_large_batch_136.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_137.pt
Normal file
BIN
nets/net_gpu_large_batch_137.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_138.pt
Normal file
BIN
nets/net_gpu_large_batch_138.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_139.pt
Normal file
BIN
nets/net_gpu_large_batch_139.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_14.pt
Normal file
BIN
nets/net_gpu_large_batch_14.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_140.pt
Normal file
BIN
nets/net_gpu_large_batch_140.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_141.pt
Normal file
BIN
nets/net_gpu_large_batch_141.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_142.pt
Normal file
BIN
nets/net_gpu_large_batch_142.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_143.pt
Normal file
BIN
nets/net_gpu_large_batch_143.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_144.pt
Normal file
BIN
nets/net_gpu_large_batch_144.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_145.pt
Normal file
BIN
nets/net_gpu_large_batch_145.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_146.pt
Normal file
BIN
nets/net_gpu_large_batch_146.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_147.pt
Normal file
BIN
nets/net_gpu_large_batch_147.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_148.pt
Normal file
BIN
nets/net_gpu_large_batch_148.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_149.pt
Normal file
BIN
nets/net_gpu_large_batch_149.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_15.pt
Normal file
BIN
nets/net_gpu_large_batch_15.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_150.pt
Normal file
BIN
nets/net_gpu_large_batch_150.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_151.pt
Normal file
BIN
nets/net_gpu_large_batch_151.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_152.pt
Normal file
BIN
nets/net_gpu_large_batch_152.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_153.pt
Normal file
BIN
nets/net_gpu_large_batch_153.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_154.pt
Normal file
BIN
nets/net_gpu_large_batch_154.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_155.pt
Normal file
BIN
nets/net_gpu_large_batch_155.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_156.pt
Normal file
BIN
nets/net_gpu_large_batch_156.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_157.pt
Normal file
BIN
nets/net_gpu_large_batch_157.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_158.pt
Normal file
BIN
nets/net_gpu_large_batch_158.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_159.pt
Normal file
BIN
nets/net_gpu_large_batch_159.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_16.pt
Normal file
BIN
nets/net_gpu_large_batch_16.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_160.pt
Normal file
BIN
nets/net_gpu_large_batch_160.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_161.pt
Normal file
BIN
nets/net_gpu_large_batch_161.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_162.pt
Normal file
BIN
nets/net_gpu_large_batch_162.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_163.pt
Normal file
BIN
nets/net_gpu_large_batch_163.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_164.pt
Normal file
BIN
nets/net_gpu_large_batch_164.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_165.pt
Normal file
BIN
nets/net_gpu_large_batch_165.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_166.pt
Normal file
BIN
nets/net_gpu_large_batch_166.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_167.pt
Normal file
BIN
nets/net_gpu_large_batch_167.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_168.pt
Normal file
BIN
nets/net_gpu_large_batch_168.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_169.pt
Normal file
BIN
nets/net_gpu_large_batch_169.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_17.pt
Normal file
BIN
nets/net_gpu_large_batch_17.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_170.pt
Normal file
BIN
nets/net_gpu_large_batch_170.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_171.pt
Normal file
BIN
nets/net_gpu_large_batch_171.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_172.pt
Normal file
BIN
nets/net_gpu_large_batch_172.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_173.pt
Normal file
BIN
nets/net_gpu_large_batch_173.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_174.pt
Normal file
BIN
nets/net_gpu_large_batch_174.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_175.pt
Normal file
BIN
nets/net_gpu_large_batch_175.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_176.pt
Normal file
BIN
nets/net_gpu_large_batch_176.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_177.pt
Normal file
BIN
nets/net_gpu_large_batch_177.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_178.pt
Normal file
BIN
nets/net_gpu_large_batch_178.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_179.pt
Normal file
BIN
nets/net_gpu_large_batch_179.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_18.pt
Normal file
BIN
nets/net_gpu_large_batch_18.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_180.pt
Normal file
BIN
nets/net_gpu_large_batch_180.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_181.pt
Normal file
BIN
nets/net_gpu_large_batch_181.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_182.pt
Normal file
BIN
nets/net_gpu_large_batch_182.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_183.pt
Normal file
BIN
nets/net_gpu_large_batch_183.pt
Normal file
Binary file not shown.
BIN
nets/net_gpu_large_batch_184.pt
Normal file
BIN
nets/net_gpu_large_batch_184.pt
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue