15c9d980c4b46ebbfc37b71d10d835956c227b73,luminoth/models/ssd/feature_extractor.py,SSDFeatureExtractor,_build,#SSDFeatureExtractor#,40

Before Change


                inputs_shape = vgg_conv4_3.shape
                inputs_rank = inputs_shape.ndims
                dtype = vgg_conv4_3.dtype.base_dtype
                norm_dim = tf.range(inputs_rank - 1, inputs_rank)
                params_shape = inputs_shape[-1:]

                // Normalize.
                vgg_conv4_3_norm = tf.nn.l2_normalize(

After Change


                    vgg_conv4_3, 3, epsilon=1e-12
                )
                // Scale.
                scale_initializer = tf.ones(
                    [1, 1, 1, vgg_conv4_3.shape[3]]
                ) * 20.0  // They initialize to 20.0 in paper
                scale = tf.get_variable(
                    "gamma",
                    dtype=vgg_conv4_3.dtype.base_dtype,
                    initializer=scale_initializer
                )
                vgg_conv4_3_norm = tf.multiply(vgg_conv4_3_norm, scale)
                tf.summary.histogram("conv4_3_normalized_hist", vgg_conv4_3)
            tf.add_to_collection("FEATURE_MAPS", vgg_conv4_3_norm)

            // The original SSD paper uses a modified version of the vgg16
            // network, which we"ll modify here
            vgg_network_truncation_endpoint = base_net_endpoints[
                scope + "/vgg_16/conv5/conv5_3"]
            tf.summary.histogram(
                "conv5_3_hist",
                vgg_network_truncation_endpoint
            )

            // Extra layers for vgg16 as detailed in paper
            with tf.variable_scope("extra_feature_layers"):
                self._init_vgg16_extra_layers()
                net = tf.nn.max_pool(
                    vgg_network_truncation_endpoint, [1, 3, 3, 1],
                    padding="SAME", strides=[1, 1, 1, 1], name="pool5"
                )
                net = self.conv6(net)
                net = self.activation_fn(net)
                net = self.conv7(net)
                net = self.activation_fn(net)
                tf.summary.histogram("conv7_hist", net)
                tf.add_to_collection("FEATURE_MAPS", net)
                net = self.conv8_1(net)
                net = self.activation_fn(net)
                net = self.conv8_2(net)
                net = self.activation_fn(net)
                tf.summary.histogram("conv8_hist", net)
                tf.add_to_collection("FEATURE_MAPS", net)
                net = self.conv9_1(net)
                net = self.activation_fn(net)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: tryolabs/luminoth
Commit Name: 15c9d980c4b46ebbfc37b71d10d835956c227b73
Time: 2018-04-16
Author: joaquin.alori@gmail.com
File Name: luminoth/models/ssd/feature_extractor.py
Class Name: SSDFeatureExtractor
Method Name: _build


Project Name: tryolabs/luminoth
Commit Name: 15c9d980c4b46ebbfc37b71d10d835956c227b73
Time: 2018-04-16
Author: joaquin.alori@gmail.com
File Name: luminoth/models/ssd/feature_extractor.py
Class Name: SSDFeatureExtractor
Method Name: _build


Project Name: dmlc/dgl
Commit Name: cf8a3fb30547d6e980ecd8182f64a51df8e55c62
Time: 2021-02-10
Author: expye@outlook.com
File Name: python/dgl/backend/pytorch/tensor.py
Class Name:
Method Name: pad_packed_tensor


Project Name: dmlc/dgl
Commit Name: cf8a3fb30547d6e980ecd8182f64a51df8e55c62
Time: 2021-02-10
Author: expye@outlook.com
File Name: python/dgl/backend/pytorch/tensor.py
Class Name:
Method Name: pack_padded_tensor