@@ -168,9 +168,6 @@ def visualize_class_activation(model, layer_idx, filter_indices=None, seed_input
168
168
Returns:
169
169
The model input that maximizes the output of `filter_indices` in the given `layer_idx`.
170
170
"""
171
- filter_indices = utils .listify (filter_indices )
172
- print ("Working on filters: {}" .format (pprint .pformat (filter_indices )))
173
-
174
171
losses = [
175
172
(ActivationMaximization (model .layers [layer_idx ], filter_indices ), act_max_weight ),
176
173
(LPNorm (model .input ), lp_norm_weight ),
@@ -219,9 +216,6 @@ def visualize_regression_activation(model, layer_idx, output_indices, targets, s
219
216
Returns:
220
217
The model input that causes regression `output_indices` outputs to approach their corresponding `targets`.
221
218
"""
222
- output_indices = utils .listify (output_indices )
223
- print ("Working on output indices: {}" .format (pprint .pformat (output_indices )))
224
-
225
219
losses = [
226
220
(RegressionTarget (model .layers [layer_idx ], output_indices , targets ), reg_target_weight ),
227
221
(LPNorm (model .input ), lp_norm_weight ),
@@ -290,9 +284,6 @@ def visualize_class_saliency(model, layer_idx, filter_indices, seed_input):
290
284
The heatmap image indicating the `seed_input` regions whose change would most contribute towards
291
285
maximizing the output of `filter_indices`.
292
286
"""
293
- filter_indices = utils .listify (filter_indices )
294
- print ("Working on filters: {}" .format (pprint .pformat (filter_indices )))
295
-
296
287
# `ActivationMaximization` loss reduces as outputs get large, hence negative gradients indicate the direction
297
288
# for increasing activations. Multiply with -1 so that positive gradients indicate increase instead.
298
289
losses = [
@@ -328,9 +319,6 @@ def visualize_regression_saliency(model, layer_idx, output_indices, targets, see
328
319
The heatmap image indicating the `seed_input` regions whose change would most contribute towards `output_indices`
329
320
outputs to approach their corresponding `targets`.
330
321
"""
331
- output_indices = utils .listify (output_indices )
332
- print ("Working on filters: {}" .format (pprint .pformat (output_indices )))
333
-
334
322
# `RegressionTarget` loss reduces as outputs approach target, hence negative gradients indicate this direction.
335
323
# Multiply with -1 so that positive gradients indicate this direction instead.
336
324
losses = [
0 commit comments