Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Jan 29, 2016
1 parent 14b1090 commit 92b1948
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/conv_filter_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
weights_path = 'vgg16_weights.h5'

# the name of the layer we want to visualize (see model definition below)
filter_name = 'conv5_1'
layer_name = 'conv5_1'

# util function to convert a tensor into a valid image
def deprocess_image(x):
Expand Down Expand Up @@ -120,7 +120,7 @@ def normalize(x):

# we build a loss function that maximizes the activation
# of the nth filter of the layer considered
layer_output = layer_dict[filter_name].get_output()
layer_output = layer_dict[layer_name].get_output()
loss = K.mean(layer_output[:, filter_index, :, :])

# we compute the gradient of the input picture wrt this loss
Expand Down

0 comments on commit 92b1948

Please sign in to comment.