929a1d5e218e64161d40fa094f7bdddcfeb589c8,fermodel.py,FERModel,_extract_features,#FERModel#,104

Before Change


        featureExtractor = FeatureExtractor(self.train_images, return_2d_array=True)
        featureExtractor.add_feature("hog", {"orientations": 8, "pixels_per_cell": (4, 4), "cells_per_block": (1, 1)})
        raw_features = featureExtractor.extract()
        features = list()
        for feature in raw_features:
            features.append([[feature]])
        self.x_train = np.array(features)
        if self.verbose:
            print("feature shape: " + str(self.x_train.shape))
            print("label shape: " + str(self.y_train.shape))

After Change


        featureExtractor = FeatureExtractor(self.train_images, return_2d_array=True)
        featureExtractor.add_feature("hog", {"orientations": 8, "pixels_per_cell": (4, 4), "cells_per_block": (1, 1)})
        raw_features = featureExtractor.extract()
        self.x_train = np.array([[np.array([feature]).reshape(list(self.target_dimensions)+[self.channels])] for feature in raw_features])

        print("Formatting image data...")

        if self.verbose:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: thoughtworksarts/EmoPy
Commit Name: 929a1d5e218e64161d40fa094f7bdddcfeb589c8
Time: 2018-02-05
Author: aperez@thoughtworks.com
File Name: fermodel.py
Class Name: FERModel
Method Name: _extract_features


Project Name: kundajelab/dragonn
Commit Name: 9c158b87f5fb2dca1ed95884e667ab2fc218e1b7
Time: 2017-05-01
Author: jisraeli@stanford.edu
File Name: dragonn/models.py
Class Name: SequenceDNN
Method Name: deeplift


Project Name: janfreyberg/superintendent
Commit Name: 1401e8bd2bdbccbedb696bd742e4934d5ba96fcb
Time: 2018-10-31
Author: janfreyberg@users.noreply.github.com
File Name: tests/test_clustersupervisor.py
Class Name:
Method Name: