This commit is contained in:
Jakub Henyk 2023-05-07 18:26:05 +02:00
parent 0cc0810ad7
commit 42ec57f385

View File

@ -74,9 +74,9 @@ if __name__ == '__main__':
criterion = nn.CrossEntropyLoss()
optimizer = optim.SGD(net.parameters(), lr=0.001, momentum=0.9)
epochs = int(sys.argv[1])
epochs = sys.argv[1]
trainNet(trainloader, criterion, optimizer, epochs)
trainNet(trainloader, criterion, optimizer, int(epochs))
PATH = './cifar_net.pth'
torch.save(net.state_dict(), PATH)