Skip to content
Snippets Groups Projects
Commit f3207316 authored by Jeffrey Wigger's avatar Jeffrey Wigger
Browse files

fixed reddit debug

parent c5ad1d8f
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ procs_per_machine=16 ...@@ -43,7 +43,7 @@ procs_per_machine=16
machines=6 machines=6
global_epochs=80 global_epochs=80
eval_file=testing.py eval_file=testing.py
log_level=INFO log_level=DEBUG
ip_machines=$nfs_home/configs/ip_addr_6Machines.json ip_machines=$nfs_home/configs/ip_addr_6Machines.json
......
...@@ -484,7 +484,7 @@ class Reddit(Dataset): ...@@ -484,7 +484,7 @@ class Reddit(Dataset):
count += 1 count += 1
_, predictions = torch.max(outputs, 1) _, predictions = torch.max(outputs, 1)
for label, prediction in zip(labels, predictions): for label, prediction in zip(labels, predictions):
logging.debug("{} predicted as {}".format(label, prediction)) # logging.debug("{} predicted as {}".format(label, prediction))
if label == prediction: if label == prediction:
correct_pred[label] += 1 correct_pred[label] += 1
total_correct += 1 total_correct += 1
...@@ -498,7 +498,7 @@ class Reddit(Dataset): ...@@ -498,7 +498,7 @@ class Reddit(Dataset):
accuracy = 100 * float(value) / total_pred[key] accuracy = 100 * float(value) / total_pred[key]
else: else:
accuracy = 100.0 accuracy = 100.0
logging.debug("Accuracy for class {} is: {:.1f} %".format(key, accuracy)) # logging.debug("Accuracy for class {} is: {:.1f} %".format(key, accuracy))
accuracy = 100 * float(total_correct) / total_predicted accuracy = 100 * float(total_correct) / total_predicted
loss_val = loss_val / count loss_val = loss_val / count
......
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