Skip to content

Commit

Permalink
Code improvement while debugging activation maps issues in #31
Browse files Browse the repository at this point in the history
  • Loading branch information
tonio73 committed Apr 13, 2020
1 parent aa94c3c commit 1070d00
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dnnviewer/panes/bottom.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ def update_test_sample(index):
def update_activation_map(active_tab, index, selected_unit, _):
if active_tab is not None \
and index is not None and test_data.x is not None \
and model_sequence \
and selected_unit:
and selected_unit and selected_unit['layer_idx'] is not None:
if active_tab == 'activation':
layer = grapher.layers[selected_unit['layer_idx']]
return layer.get_activation_map(model_sequence, test_data.x[index], selected_unit['unit_idx'])
Expand Down

0 comments on commit 1070d00

Please sign in to comment.