Skip to content

Commit

Permalink
added confusion matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
ruoyzhang committed Oct 19, 2018
1 parent f856ead commit a99eaf2
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 6 deletions.
Binary file added .DS_Store
Binary file not shown.
6 changes: 0 additions & 6 deletions class_activation_map.py
Expand Up @@ -65,12 +65,6 @@ def generate_CAM(self, img, class_code = None):
if class_code is None:
class_code = np.argmax(output.cpu().data.numpy())

# one_hot = np.zeros((1, output.size()[-1]), dtype = np.float32)
# one_hot[0][class_code] = 1
# one_hot = torch.from_numpy(one_hot)
# one_hot.requires_grad = True
# one_hot = one_hot.cuda()
# activation_value = torch.sum(torch.mm(one_hot, output.t()))
activation_value = output[0][class_code]

# reset grad
Expand Down
Binary file added presentation/conf_mat_recall.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added presentation/conf_max.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added presentation/conf_max_precision.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a99eaf2

Please sign in to comment.