Skip to content
Snippets Groups Projects
Commit 565957ae authored by Rishi Sharma's avatar Rishi Sharma
Browse files

Multi-machine-fix

parent 23974f99
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ lr = 0.01
[TRAIN_PARAMS]
training_package = decentralizepy.training.Training
training_class = Training
epochs_per_round = 10
epochs_per_round = 4
batch_size = 1024
shuffle = True
loss_package = torch.nn
......
......@@ -275,7 +275,10 @@ class Femnist(Dataset):
logging.debug("Predicted on the test set")
for key, value in enumerate(correct_pred):
accuracy = 100 * float(value) / total_pred[key]
if total_pred[key] != 0:
accuracy = 100 * float(value) / total_pred[key]
else:
accuracy = 100.0
logging.debug("Accuracy for class {} is: {:.1f} %".format(key, accuracy))
accuracy = 100 * float(total_correct) / total_predicted
......
......@@ -42,5 +42,5 @@ if __name__ == "__main__":
mp.spawn(
fn=Node,
nprocs=procs_per_machine,
args=[m_id, l, g, my_config, 20, "results", logging.DEBUG],
args=[m_id, l, g, my_config, 20, "results", logging.INFO],
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment