File size: 11,324 Bytes
83d7ce2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
(function() {
  var fn = function() {
    
    (function(root) {
      function now() {
        return new Date();
      }
    
      var force = false;
    
      if (typeof root._bokeh_onload_callbacks === "undefined" || force === true) {
        root._bokeh_onload_callbacks = [];
        root._bokeh_is_loading = undefined;
      }
    
      
      
    
      var element = document.getElementById("cfd2f3a7-70e9-40d6-824f-a6908fc889de");
        if (element == null) {
          console.warn("Bokeh: autoload.js configured with elementid 'cfd2f3a7-70e9-40d6-824f-a6908fc889de' but no matching script tag was found.")
        }
      
    
      function run_callbacks() {
        try {
          root._bokeh_onload_callbacks.forEach(function(callback) {
            if (callback != null)
              callback();
          });
        } finally {
          delete root._bokeh_onload_callbacks
        }
        console.debug("Bokeh: all callbacks have finished");
      }
    
      function load_libs(css_urls, js_urls, callback) {
        if (css_urls == null) css_urls = [];
        if (js_urls == null) js_urls = [];
    
        root._bokeh_onload_callbacks.push(callback);
        if (root._bokeh_is_loading > 0) {
          console.debug("Bokeh: BokehJS is being loaded, scheduling callback at", now());
          return null;
        }
        if (js_urls == null || js_urls.length === 0) {
          run_callbacks();
          return null;
        }
        console.debug("Bokeh: BokehJS not loaded, scheduling load and callback at", now());
        root._bokeh_is_loading = css_urls.length + js_urls.length;
    
        function on_load() {
          root._bokeh_is_loading--;
          if (root._bokeh_is_loading === 0) {
            console.debug("Bokeh: all BokehJS libraries/stylesheets loaded");
            run_callbacks()
          }
        }
    
        function on_error(url) {
          console.error("failed to load " + url);
        }
    
        for (let i = 0; i < css_urls.length; i++) {
          const url = css_urls[i];
          const element = document.createElement("link");
          element.onload = on_load;
          element.onerror = on_error.bind(null, url);
          element.rel = "stylesheet";
          element.type = "text/css";
          element.href = url;
          console.debug("Bokeh: injecting link tag for BokehJS stylesheet: ", url);
          document.body.appendChild(element);
        }
    
        const hashes = {"https://cdn.bokeh.org/bokeh/release/bokeh-2.3.2.min.js": "XypntL49z55iwGVUW4qsEu83zKL3XEcz0MjuGOQ9SlaaQ68X/g+k1FcioZi7oQAc", "https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.3.2.min.js": "bEsM86IHGDTLCS0Zod8a8WM6Y4+lafAL/eSiyQcuPzinmWNgNO2/olUF0Z2Dkn5i", "https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.3.2.min.js": "TX0gSQTdXTTeScqxj6PVQxTiRW8DOoGVwinyi1D3kxv7wuxQ02XkOxv0xwiypcAH"};
    
        for (let i = 0; i < js_urls.length; i++) {
          const url = js_urls[i];
          const element = document.createElement('script');
          element.onload = on_load;
          element.onerror = on_error.bind(null, url);
          element.async = false;
          element.src = url;
          if (url in hashes) {
            element.crossOrigin = "anonymous";
            element.integrity = "sha384-" + hashes[url];
          }
          console.debug("Bokeh: injecting script tag for BokehJS library: ", url);
          document.head.appendChild(element);
        }
      };
    
      function inject_raw_css(css) {
        const element = document.createElement("style");
        element.appendChild(document.createTextNode(css));
        document.body.appendChild(element);
      }
    
      
      var js_urls = ["https://cdn.bokeh.org/bokeh/release/bokeh-2.3.2.min.js", "https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.3.2.min.js", "https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.3.2.min.js"];
      var css_urls = [];
      
    
      var inline_js = [
        function(Bokeh) {
          Bokeh.set_log_level("info");
        },
        
        function(Bokeh) {
          (function() {
            var fn = function() {
              Bokeh.safely(function() {
                (function(root) {
                  function embed_document(root) {
                    
                  var docs_json = '{"c28d8438-7215-485b-84e6-63ce6211e606":{"defs":[],"roots":{"references":[{"attributes":{},"id":"1057","type":"Selection"},{"attributes":{"text":"Pruned Transformer Heads"},"id":"1003","type":"Title"},{"attributes":{},"id":"1058","type":"UnionRenderers"},{"attributes":{"fields":[]},"id":"1021","type":"Stack"},{"attributes":{"source":{"id":"1025"}},"id":"1030","type":"CDSView"},{"attributes":{},"id":"1009","type":"CategoricalScale"},{"attributes":{"bottom":{"expr":{"id":"1021"}},"fill_alpha":{"value":0.1},"fill_color":{"value":"#0000ff"},"line_alpha":{"value":0.1},"line_color":{"value":"#0000ff"},"top":{"expr":{"id":"1022"}},"width":{"value":0.9},"x":{"field":"layers"}},"id":"1028","type":"VBar"},{"attributes":{"axis_label":"Layer index","formatter":{"id":"1032"},"major_label_policy":{"id":"1034"},"minor_tick_line_color":null,"ticker":{"id":"1014"}},"id":"1013","type":"CategoricalAxis"},{"attributes":{},"id":"1011","type":"LinearScale"},{"attributes":{"factors":["0","1","2","3","4","5","6","7","8","9","10","11"],"range_padding":0.1},"id":"1005","type":"FactorRange"},{"attributes":{"start":0},"id":"1007","type":"DataRange1d"},{"attributes":{"data_source":{"id":"1025"},"glyph":{"id":"1027"},"hover_glyph":null,"muted_glyph":null,"name":"active","nonselection_glyph":{"id":"1028"},"view":{"id":"1030"}},"id":"1029","type":"GlyphRenderer"},{"attributes":{},"id":"1014","type":"CategoricalTicker"},{"attributes":{"above":[{"id":"1060"}],"below":[{"id":"1013"}],"center":[{"id":"1015"},{"id":"1019"},{"id":"1040"}],"height":400,"left":[{"id":"1016"}],"outline_line_color":null,"renderers":[{"id":"1029"},{"id":"1046"}],"title":{"id":"1003"},"toolbar":{"id":"1020"},"toolbar_location":null,"x_range":{"id":"1005"},"x_scale":{"id":"1009"},"y_range":{"id":"1007"},"y_scale":{"id":"1011"}},"id":"1002","subtype":"Figure","type":"Plot"},{"attributes":{"axis":{"id":"1013"},"grid_line_color":null,"ticker":null},"id":"1015","type":"Grid"},{"attributes":{"items":[{"id":"1041"},{"id":"1059"}],"location":"top"},"id":"1040","type":"Legend"},{"attributes":{},"id":"1035","type":"BasicTickFormatter"},{"attributes":{"axis_label":"Heads count","formatter":{"id":"1035"},"major_label_policy":{"id":"1037"},"minor_tick_line_color":null,"ticker":{"id":"1017"}},"id":"1016","type":"LinearAxis"},{"attributes":{"axis":{"id":"1016"},"dimension":1,"ticker":null},"id":"1019","type":"Grid"},{"attributes":{"data":{"active":[5,4,3,3,7,8,6,7,6,4,2,1],"layers":["0","1","2","3","4","5","6","7","8","9","10","11"],"pruned":[7,8,9,9,5,4,6,5,6,8,10,11]},"selected":{"id":"1057"},"selection_policy":{"id":"1058"}},"id":"1042","type":"ColumnDataSource"},{"attributes":{},"id":"1017","type":"BasicTicker"},{"attributes":{},"id":"1032","type":"CategoricalTickFormatter"},{"attributes":{"active_multi":null},"id":"1020","type":"Toolbar"},{"attributes":{},"id":"1034","type":"AllLabels"},{"attributes":{"bottom":{"expr":{"id":"1023"}},"fill_alpha":{"value":0.1},"fill_color":{"value":"#ffcccc"},"line_alpha":{"value":0.1},"line_color":{"value":"#ffcccc"},"top":{"expr":{"id":"1024"}},"width":{"value":0.9},"x":{"field":"layers"}},"id":"1045","type":"VBar"},{"attributes":{"label":{"value":"pruned"},"renderers":[{"id":"1046"}]},"id":"1059","type":"LegendItem"},{"attributes":{"items":[{"id":"1061"},{"id":"1062"}],"location":[10,0],"orientation":"horizontal"},"id":"1060","type":"Legend"},{"attributes":{"source":{"id":"1042"}},"id":"1047","type":"CDSView"},{"attributes":{"bottom":{"expr":{"id":"1023"}},"fill_color":{"value":"#ffcccc"},"line_color":{"value":"#ffcccc"},"top":{"expr":{"id":"1024"}},"width":{"value":0.9},"x":{"field":"layers"}},"id":"1044","type":"VBar"},{"attributes":{"label":{"value":"active"},"renderers":[{"id":"1029"}]},"id":"1061","type":"LegendItem"},{"attributes":{"data_source":{"id":"1042"},"glyph":{"id":"1044"},"hover_glyph":null,"muted_glyph":null,"name":"pruned","nonselection_glyph":{"id":"1045"},"view":{"id":"1047"}},"id":"1046","type":"GlyphRenderer"},{"attributes":{"label":{"value":"pruned"},"renderers":[{"id":"1046"}]},"id":"1062","type":"LegendItem"},{"attributes":{},"id":"1038","type":"Selection"},{"attributes":{},"id":"1039","type":"UnionRenderers"},{"attributes":{"bottom":{"expr":{"id":"1021"}},"fill_color":{"value":"#0000ff"},"line_color":{"value":"#0000ff"},"top":{"expr":{"id":"1022"}},"width":{"value":0.9},"x":{"field":"layers"}},"id":"1027","type":"VBar"},{"attributes":{"data":{"active":[5,4,3,3,7,8,6,7,6,4,2,1],"layers":["0","1","2","3","4","5","6","7","8","9","10","11"],"pruned":[7,8,9,9,5,4,6,5,6,8,10,11]},"selected":{"id":"1038"},"selection_policy":{"id":"1039"}},"id":"1025","type":"ColumnDataSource"},{"attributes":{"fields":["active"]},"id":"1022","type":"Stack"},{"attributes":{"fields":["active"]},"id":"1023","type":"Stack"},{"attributes":{},"id":"1037","type":"AllLabels"},{"attributes":{"fields":["active","pruned"]},"id":"1024","type":"Stack"},{"attributes":{"label":{"value":"active"},"renderers":[{"id":"1029"}]},"id":"1041","type":"LegendItem"}],"root_ids":["1002"]},"title":"Bokeh Application","version":"2.3.2"}}';
                  var render_items = [{"docid":"c28d8438-7215-485b-84e6-63ce6211e606","root_ids":["1002"],"roots":{"1002":"cfd2f3a7-70e9-40d6-824f-a6908fc889de"}}];
                  root.Bokeh.embed.embed_items(docs_json, render_items);
                
                  }
                  if (root.Bokeh !== undefined) {
                    embed_document(root);
                  } else {
                    var attempts = 0;
                    var timer = setInterval(function(root) {
                      if (root.Bokeh !== undefined) {
                        clearInterval(timer);
                        embed_document(root);
                      } else {
                        attempts++;
                        if (attempts > 100) {
                          clearInterval(timer);
                          console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing");
                        }
                      }
                    }, 10, root)
                  }
                })(window);
              });
            };
            if (document.readyState != "loading") fn();
            else document.addEventListener("DOMContentLoaded", fn);
          })();
        },
        function(Bokeh) {
        
        
        }
      ];
    
      function run_inline_js() {
        
        for (var i = 0; i < inline_js.length; i++) {
          inline_js[i].call(root, root.Bokeh);
        }
        
      }
    
      if (root._bokeh_is_loading === 0) {
        console.debug("Bokeh: BokehJS loaded, going straight to plotting");
        run_inline_js();
      } else {
        load_libs(css_urls, js_urls, function() {
          console.debug("Bokeh: BokehJS plotting callback run at", now());
          run_inline_js();
        });
      }
    }(window));
  };
  if (document.readyState != "loading") fn();
  else document.addEventListener("DOMContentLoaded", fn);
})();