8a5a6993cec37c98e823d251febcd0b91089bd44,keract/keract.py,,display_heatmaps,#Any#Any#Any#,88
Before Change
continue
print("")
fig = plt.figure(figsize=(12, 12))
plt.axis("off")
plt.title(layer_name)
// computes values required to scale the activations (which will form our heat map) to be in range 0-1
scaler = MinMaxScaler()
scaler.fit(acts.reshape(-1, 1))
After Change
scaler = MinMaxScaler()
scaler.fit(acts.reshape(-1, 1))
for i in range(nrows * ncols):
if i < acts.shape[-1]:
img = acts[0, :, :, i]
// scale the activations (which will form our heat map) to be in range 0-1
img = scaler.transform(img)
// resize heatmap to be same dimensions of image
img = Image.fromarray(img)
img = img.resize((image.shape[0], image.shape[1]), Image.BILINEAR)
img = np.array(img)
axes.flat[i].imshow(img / 255.0)
// overlay a 70% transparent heat map onto the image
// Lowest activations are dark, highest are dark red, mid are yellow
axes.flat[i].imshow(img, alpha=0.3, cmap="jet", interpolation="bilinear")
axes.flat[i].axis("off")
if save:
plt.savefig(layer_name.split("/")[0] + ".png", bbox_inches="tight")
else:
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 2
Instances Project Name: philipperemy/keras-activations
Commit Name: 8a5a6993cec37c98e823d251febcd0b91089bd44
Time: 2019-03-17
Author: 28253514+Stochastic13@users.noreply.github.com
File Name: keract/keract.py
Class Name:
Method Name: display_heatmaps
Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 1fe68f56e51996417f982ce0a9c487f64a3b2158
Time: 2018-10-15
Author: saulomastelini@gmail.com
File Name: src/skmultiflow/visualization/evaluation_visualizer.py
Class Name: EvaluationVisualizer
Method Name: __configure
Project Name: danforthcenter/plantcv
Commit Name: 4da4eb2efc5aebbdd83fae53fb56c720fffa6127
Time: 2015-08-19
Author: maliadong@gmail.com
File Name: lib/plantcv/analyze_color.py
Class Name:
Method Name: _pseudocolored_image
Project Name: gboeing/osmnx
Commit Name: 1e6a99d900da6a9451bfc5ae7f1a7061b29a4686
Time: 2020-06-10
Author: boeing@usc.edu
File Name: osmnx/plot.py
Class Name:
Method Name: _config_ax
Project Name: theislab/scanpy
Commit Name: 2ea9f836cec6e12a5cdd37bc4a229d4eadf59d37
Time: 2020-07-31
Author: fidel.ramirez@gmail.com
File Name: scanpy/plotting/_stacked_violin.py
Class Name: StackedViolin
Method Name: _make_rows_of_violinplots