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


            if "Flatten" in self._previous_layer_name:
                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: OpenNMT/OpenNMT-tf
Commit Name: 3087c81d4a5cb0c1251760ec240ec67728820f53
Time: 2019-04-02
Author: guillaume.klein@systrangroup.com
File Name: opennmt/models/language_model.py
Class Name: LanguageModel
Method Name: call


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: c35b902f44627bc53be6152092bc60ae82b1fe2e
Time: 2020-08-25
Author: abigailt@il.ibm.com
File Name: art/attacks/inference/membership_inference.py
Class Name: MembershipInferenceBlackBox
Method Name: fit