bc388862e12e27c1494078aa2409f1875ebba693,modules/lstm-cc-detection-1/lstm-cc-detection-1.py,Module,convert_input_for_module,#Module#Any#,96

Before Change


        // Convert to one-hot encoding
        pre_behavioral_model_oh = np.empty((pre_behavioral_model.shape[0], 500, 50))
        for i, a_list in enumerate(pre_behavioral_model):
            pre_behavioral_model_oh[i] = to_categorical(a_list, num_classes=50)
        //print(f"4 BM: {pre_behavioral_model_oh}")
        return pre_behavioral_model_oh

    def run(self):

After Change


        //self.print(f"The sequence has shape {pre_behavioral_model.shape}")

        // Reshape into (1, 500, 1) We need the first 1, because this is one sample only, but keras expects a 3d vector
        pre_behavioral_model = np.reshape(pre_behavioral_model, (1, max_length, 1))

        // self.print(f"Post Padded Seq sent: {pre_behavioral_model}. Shape: {pre_behavioral_model.shape}")
        return pre_behavioral_model
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: stratosphereips/StratosphereLinuxIPS
Commit Name: bc388862e12e27c1494078aa2409f1875ebba693
Time: 2020-06-06
Author: eldraco@gmail.com
File Name: modules/lstm-cc-detection-1/lstm-cc-detection-1.py
Class Name: Module
Method Name: convert_input_for_module


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 7baa06c0a69e4e5d62483dd46690ac911b54c475
Time: 2018-08-24
Author: BJEdwards@gmail.com
File Name: art/attacks/iterative_method_unittest.py
Class Name: TestIterativeAttack
Method Name: _test_mnist_targeted


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 7baa06c0a69e4e5d62483dd46690ac911b54c475
Time: 2018-08-24
Author: BJEdwards@gmail.com
File Name: art/attacks/fast_gradient_unittest.py
Class Name: TestFastGradientMethod
Method Name: _test_mnist_targeted