File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ export function TopkSamples({
1717 zerothDimensionLabels,
1818 firstDimensionLabels
1919} : TopkSamplesProps ) {
20- // Obtain min and max activations for a consistent color scale across all samples
21- const [ minValue , maxValue ] = minMaxInNestedArray ( activations ) ;
22-
2320 const numberOfLayers = activations . length ;
2421 const numberOfNeurons = activations [ 0 ] . length ;
2522 const numberOfSamples = activations [ 0 ] [ 0 ] . length ;
@@ -46,6 +43,11 @@ export function TopkSamples({
4643 return tokens [ layerNumber ] [ neuronNumber ] [ sampleNumber ] ;
4744 } ) ;
4845
46+ // For a consistent color scale across all samples in this layer and neuron
47+ const [ minValue , maxValue ] = minMaxInNestedArray (
48+ activations [ layerNumber ] [ neuronNumber ]
49+ ) ;
50+
4951 const selectRowStyle = {
5052 paddingTop : 5 ,
5153 paddingBottom : 5
You can’t perform that action at this time.
0 commit comments