a5a6e074ed792733fc2547e1544711d52659d3fd,python/tests/transformers/named_image_test.py,NamedImageTransformerBaseTestCase,test_featurization,#NamedImageTransformerBaseTestCase#,131

Before Change


        collected = transformed_df.collect()
        for row in collected:
            predictions = row[output_col]
            self.assertEqual(len(predictions), self.appModel.numOutputFeatures())
            // TODO: actually check the value of the output to see if they are reasonable
            // e.g. -- compare to just running with keras.

    def test_featurizer_in_pipeline(self):

After Change


        // Note: keras features may be multi-dimensional np arrays, but transformer features
        // will be 1-d vectors. Regardless, the dimensions should add up to the same.
        self.assertEqual(np.prod(self.kerasFeatures.shape), np.prod(features.shape))
        kerasReshaped = self.kerasFeatures.reshape(self.kerasFeatures.shape[0], -1)
        np.testing.assert_array_almost_equal(kerasReshaped, features, decimal=6)

    def test_featurizer_in_pipeline(self):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: databricks/spark-deep-learning
Commit Name: a5a6e074ed792733fc2547e1544711d52659d3fd
Time: 2017-07-11
Author: sueann@databricks.com
File Name: python/tests/transformers/named_image_test.py
Class Name: NamedImageTransformerBaseTestCase
Method Name: test_featurization


Project Name: rtqichen/torchdiffeq
Commit Name: 7391aec984c1e9e0899d51e6b0538483c37ec8fb
Time: 2020-07-27
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/misc.py
Class Name:
Method Name: _check_inputs


Project Name: bethgelab/foolbox
Commit Name: bf635f90dae66e4ddd3e1f342dca925b3c99faf7
Time: 2020-02-11
Author: git@jonasrauber.de
File Name: foolbox/attacks/binarization.py
Class Name: BinarizationRefinementAttack
Method Name: __call__