5c3de2518362675e14b15f87044742a94b816ef2,snntoolbox/simulation/target_simulators/loihi_target_sim.py,SNN,add_layer,#SNN#Any#,104

Before Change


        // Convert weights to integers.
        if len(layer.weights):
            weights, biases = layer.get_weights()
            num_weight_bits = eval(self.config.get(
                "loihi", "connection_kwargs"))["numWeightBits"]
            weights, biases = to_integer(weights, biases, num_weight_bits)
            spike_layer.set_weights([weights, biases])

After Change


                pl = self.parsed_model.get_layer(self._previous_layer_name)
                shape = pl.input_shape[1:]
                permutation = np.ravel(np.reshape(
                    np.arange(int(np.prod(shape))), shape, "F"), "C")
                weights = weights[permutation]

            spike_layer.set_weights([weights, biases])

        elif "AveragePooling" in get_type(layer):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 5c3de2518362675e14b15f87044742a94b816ef2
Time: 2019-08-20
Author: bodo.rueckauer@intel.com
File Name: snntoolbox/simulation/target_simulators/loihi_target_sim.py
Class Name: SNN
Method Name: add_layer


Project Name: TheAlgorithms/Python
Commit Name: 4fe88f2f8efbbef9b79cda0b5a6f08039096a0c2
Time: 2017-06-07
Author: gupta2140@gmail.com
File Name: traverals/binary_tree_traversals.py
Class Name:
Method Name: build_tree


Project Name: tensorlayer/tensorlayer
Commit Name: be501b8047e1129644dea821d63faef06493c90b
Time: 2016-09-21
Author: dhsig552@163.com
File Name: tensorlayer/layers.py
Class Name: Layer
Method Name: count_params