signal-grad-cam 0.1.4__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of signal-grad-cam might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: signal_grad_cam
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: SignalGrad-CAM aims at generalising Grad-CAM to one-dimensional applications, while enhancing usability and efficiency.
5
5
  Home-page: https://github.com/samuelepe11/signal_grad_cam
6
6
  Author: Samuele Pe
@@ -5,7 +5,7 @@ with open("README.md", "r") as f:
5
5
 
6
6
  setup(
7
7
  name="signal_grad_cam",
8
- version="0.1.4",
8
+ version="0.1.5",
9
9
  description="SignalGrad-CAM aims at generalising Grad-CAM to one-dimensional applications, while enhancing usability"
10
10
  " and efficiency.",
11
11
  keywords="XAI, class activation maps, CNN, time series",
@@ -192,7 +192,7 @@ class CamBuilder:
192
192
  extra_preprocess_inputs_list=
193
193
  extra_preprocess_inputs_list,
194
194
  extra_inputs_list=extra_inputs_list,
195
- esp=eps)
195
+ eps=eps)
196
196
  item_key = explainer_type + "_" + target_layer + "_class" + str(target_class)
197
197
  cams_dict.update({item_key: cam_list})
198
198
  predicted_probs_dict.update({item_key: output_probs})
@@ -691,7 +691,7 @@ class CamBuilder:
691
691
  norm = self.__get_norm(map)
692
692
 
693
693
  if map.shape[1] == 1:
694
- aspect = int(map.shape[0] / aspect_factor) if map.shape[0] <= aspect_factor else 1
694
+ aspect = int(map.shape[0] / aspect_factor) if map.shape[0] > aspect_factor else 100
695
695
  map = np.transpose(map)
696
696
  else:
697
697
  if is_2d_layer:
@@ -706,14 +706,9 @@ class CamBuilder:
706
706
  self.__set_colorbar(bar_ranges, i)
707
707
 
708
708
  # Set title
709
- '''if map.shape[0] > 1 and is_2d_layer:
710
- title_h = 1
711
- plt.subplots_adjust(top=0.85, bottom=0.2)
712
- else:
713
- title_h = 0.98'''
714
709
  plt.title("CAM for class '" + str(self.class_names[target_class]) + "' (confidence = " +
715
710
  str(np.round(predicted_probs[i] * 100, 2)) + "%) - true label " +
716
- str(self.class_names[data_labels[i]]))#, y=title_h)
711
+ str(self.class_names[data_labels[i]]))
717
712
 
718
713
  # Set axis
719
714
  self.__set_axes(map, data_sampling_freq, dt, channel_names, time_names=time_names, axes_names=axes_names)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: signal-grad-cam
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: SignalGrad-CAM aims at generalising Grad-CAM to one-dimensional applications, while enhancing usability and efficiency.
5
5
  Home-page: https://github.com/samuelepe11/signal_grad_cam
6
6
  Author: Samuele Pe
File without changes