9b254aaf76efaa0a3789a67137c9817684862cf9,snntoolbox/simulation/target_simulators/loihi_target_sim.py,SNN,get_vmem,#SNN#,285

Before Change


    def get_vmem(self, **kwargs):
        i = kwargs[str("monitor_index")]
        if "v_mem" in self.probe_idx_map.keys():
            idx = self.probe_idx_map["v_mem"]
            // Need to skip input layer because the toolbox does not expect it
            // to record the membrane potentials.
            if i == 0:
                plot_probe(self.probes[i][idx],
                           self.config.get("paths", "log_dir_of_current_run"),
                           "v_input.png")
            else:
                return self.probes[i][idx].data[:, -self._num_timesteps:]

    def set_spiketrain_stats_input(self):
        AbstractSNN.set_spiketrain_stats_input(self)

After Change


        return spiketrains_b_l_t / layer.vTh / 2 ** 6

    def get_vmem(self, **kwargs):
        if self.voltage_probes is None:
            return

        i = kwargs[str("monitor_index")]
        name = self.snn.layers[i].name
        probes = self.stack_layer_probes(self.voltage_probes[name])
        // Plot instead of returning input layer probes because the toolbox
        // does not expect input to record the membrane potentials.
        if i == 0:
            plot_probe(probes,
                       self.config.get("paths", "log_dir_of_current_run"),
                       "v_input.png")
        else:
            return probes

    def stack_layer_probes(self, probes):

        return np.stack([p.data[-self._num_timesteps:] for p in probes])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 20

Instances


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 9b254aaf76efaa0a3789a67137c9817684862cf9
Time: 2019-07-11
Author: bodo.rueckauer@intel.com
File Name: snntoolbox/simulation/target_simulators/loihi_target_sim.py
Class Name: SNN
Method Name: get_vmem


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 9b254aaf76efaa0a3789a67137c9817684862cf9
Time: 2019-07-11
Author: bodo.rueckauer@intel.com
File Name: snntoolbox/simulation/target_simulators/loihi_target_sim.py
Class Name: SNN
Method Name: get_spiketrains_input


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 9b254aaf76efaa0a3789a67137c9817684862cf9
Time: 2019-07-11
Author: bodo.rueckauer@intel.com
File Name: snntoolbox/simulation/target_simulators/loihi_target_sim.py
Class Name: SNN
Method Name: get_spiketrains_output


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 9b254aaf76efaa0a3789a67137c9817684862cf9
Time: 2019-07-11
Author: bodo.rueckauer@intel.com
File Name: snntoolbox/simulation/target_simulators/loihi_target_sim.py
Class Name: SNN
Method Name: get_vmem