2b3db4e19e16e0723130e5dee5d4b668e11a514d,luminoth/models/fasterrcnn/roi_pool_test.py,ROIPoolingTest,testBasic,#ROIPoolingTest#,38

Before Change


            [3, 6, 6, 9, 9],  // Inside matD
        ])
        // Construct the pretrained map with four matrix.
        matA = np.ones((5, 5))
        matB = np.ones((5, 5)) + 1
        matC = np.ones((5, 5)) + 2
        matD = np.ones((5, 5)) + 3
        pretrained = np.bmat([[matA, matB], [matC, matD]])
        // Expand the dimensions to be compatible with ROIPoolingLayer.
        pretrained = np.expand_dims(pretrained, axis=0)
        pretrained = np.expand_dims(pretrained, axis=3)

        results = self._run_roi_pooling(roi_proposals, pretrained, self.config)
        print(results["crops"].shape)
        print(results["roi_pool"][0])

After Change


            [2, 1, 6, 4, 9],  // Inside mat_C
            [3, 6, 6, 9, 9],  // Inside mat_D
        ])
        pretrained = self.pretrained

        results = self._run_roi_pooling(roi_proposals, pretrained, self.config)

        // Check that crops has the correct shape. This is (4, 4, 4, 1)
        // because we have 4 proposals, "pool size" = 2x2 then the
        // tf.image.crop_and_resize function duplicates that size.
        self.assertEqual(
            results["crops"].shape,
            (4, 4, 4, 1)
        )

        // Check that roi_pool has the correct shape. This is (4, 2, 2, 1)
        // because we have 4 proposals, "pool size" = 2x2.
        self.assertEqual(
            results["roi_pool"].shape,
            (4, 2, 2, 1)
        )

        results["roi_pool"] = np.squeeze(results["roi_pool"], axis=3)
        // Check that max polling returns only "multiplier_a"
        self.assertAllEqual(
            results["roi_pool"][0],
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: tryolabs/luminoth
Commit Name: 2b3db4e19e16e0723130e5dee5d4b668e11a514d
Time: 2017-08-16
Author: gaston@tryolabs.com
File Name: luminoth/models/fasterrcnn/roi_pool_test.py
Class Name: ROIPoolingTest
Method Name: testBasic


Project Name: keras-team/keras
Commit Name: 6e289d71866b4782dbe752adce1f26ea895f5dd9
Time: 2017-03-12
Author: francois.chollet@gmail.com
File Name: keras/layers/convolutional_recurrent.py
Class Name: ConvLSTM2D
Method Name: build


Project Name: keras-team/keras
Commit Name: 7374442a1c1507051fb1f9ee1ef774c9a9654d8b
Time: 2017-03-12
Author: francois.chollet@gmail.com
File Name: keras/layers/recurrent.py
Class Name: LSTM
Method Name: build