Skip to content

Commit

Permalink
FCN confusion matrix visualization fix
Browse files Browse the repository at this point in the history
Fix LINT check
  • Loading branch information
Michele Toni committed Mar 27, 2017
1 parent 5dccb29 commit 730c4a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions digits/model/images/classification/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,11 @@ def classify_many():
'Unable to classify any image from the file')

scores = last_output_data
# force correct 2D shape squeezing scores
for i in reversed(range(2, len(scores.shape))):
if scores.shape[i] == 1:
scores = np.squeeze(scores, axis=(i,))

# take top 5
indices = (-scores).argsort()[:, :5]

Expand Down

0 comments on commit 730c4a7

Please sign in to comment.