File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/reward_preprocessing/vis Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -263,14 +263,21 @@ def vis_traditional(
263
263
feature_list = [feature_list ]
264
264
265
265
obj = sum (
266
- # Original with cosine similarity:
266
+ # Original with cosine similarity (for if we go back to interpreting neuron
267
+ # directions in intermediate layers_:
267
268
# [
268
269
# objectives_rfi.direction_neuron_dim_agnostic(
269
270
# self.layer_name, self.channel_dirs[feature], batch=feature
270
271
# )
271
272
# for feature in feature_list
272
273
# ]
273
274
# New:
275
+ # Sum up all objectives such that we simultaneously optimize for all.
276
+ # Each objective maximizes the output for one of the activations (in this
277
+ # case equivalent to the reward for the respective actions, or overall
278
+ # reward if we don't differentiate between actions) and depends only on the
279
+ # input at that same index.
280
+ # In other words, each input maximizes its respective activation.
274
281
[
275
282
objectives_rfi .max_index_1d (self .layer_name , feature , batch = feature )
276
283
for feature in feature_list
You can’t perform that action at this time.
0 commit comments