This commit is contained in:
Jakub Henyk 2023-05-06 20:05:47 +02:00
parent 9bf4690f35
commit c66bcd324e

View File

@ -52,7 +52,7 @@ def testNet(testloader):
total += labels.size(0) total += labels.size(0)
correct += (predicted == labels).sum().item() correct += (predicted == labels).sum().item()
print(f'Accuracy of the network: {100 * correct // total} %') #print(f'Accuracy of the network: {100 * correct // total} %')
if __name__ == '__main__': if __name__ == '__main__':
@ -79,5 +79,6 @@ if __name__ == '__main__':
for item in testdata: for item in testdata:
for i in range(len(item)): for i in range(len(item)):
the_file.write(f'data: {item[0][i]} \n true value: {item[1][i]} \n prediction: {item[2][i]}\n') the_file.write(f'data: {item[0][i]} \n true value: {item[1][i]} \n prediction: {item[2][i]}\n')
print(f'data: {item[0][i]} \n true value: {item[1][i]} \n prediction: {item[2][i]}\n')