Skip to content

Commit a2bc763

Browse files
committed
Comment
1 parent 7da06fe commit a2bc763

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/reward_preprocessing/vis/reward_vis.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,21 @@ def vis_traditional(
263263
feature_list = [feature_list]
264264

265265
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_:
267268
# [
268269
# objectives_rfi.direction_neuron_dim_agnostic(
269270
# self.layer_name, self.channel_dirs[feature], batch=feature
270271
# )
271272
# for feature in feature_list
272273
# ]
273274
# 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.
274281
[
275282
objectives_rfi.max_index_1d(self.layer_name, feature, batch=feature)
276283
for feature in feature_list

0 commit comments

Comments
 (0)