309a2987c28df9cd82da00a47147e6492414e6aa,frcnn/rpn.py,RPN,__init__,#RPN#Any#Any#Any#Any#Any#Any#,8

Before Change


        super(RPN, self).__init__(name=name)
        self._anchor_scales = anchor_scales
        self._anchor_ratios = anchor_ratios
        self._num_anchors = len(anchor_scales) * len(anchor_ratios)

        self._num_channels = num_channels
        self._kernel_shape = kernel_shape

After Change


        RPN
        super(RPN, self).__init__(name=name)

        if not isinstance(anchor_scales, collections.Iterable):
            raise TypeError("anchor_scales must be iterable")
        anchor_scales = tuple(anchor_scales)

        if not isinstance(anchor_ratios, collections.Iterable):
            raise TypeError("anchor_ratios must be iterable")
        anchor_ratios = tuple(anchor_ratios)

        if not isinstance(kernel_shape, collections.Iterable):
            raise TypeError("kernel_shape must be iterable")
        kernel_shape = tuple(kernel_shape)

        if not anchor_scales:
            raise ValueError("anchor_scales must not be empty")
        if not anchor_ratios:
            raise ValueError("anchor_ratios must not be empty")

        self._anchor_scales = anchor_scales
        self._anchor_ratios = anchor_ratios
        // TODO: Do we need the anchors? Can"t we just use len(self._anchor_scales) * len(self._anchor_ratios)
        self._num_anchors = self.anchors.shape[0]

        print(self.anchors.shape)

        self._num_channels = num_channels
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: tryolabs/luminoth
Commit Name: 309a2987c28df9cd82da00a47147e6492414e6aa
Time: 2017-06-06
Author: javirey@gmail.com
File Name: frcnn/rpn.py
Class Name: RPN
Method Name: __init__


Project Name: ray-project/ray
Commit Name: 6373c706615bc94c0a1e7fc564b3d18c3d342d91
Time: 2020-04-30
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/api.py
Class Name:
Method Name: create_backend


Project Name: PetrochukM/PyTorch-NLP
Commit Name: bb9335bbc981c0541e37a875d79d0ef419008574
Time: 2018-03-25
Author: petrochukm@gmail.com
File Name: torchnlp/text_encoders/subword_encoder.py
Class Name: SubwordEncoder
Method Name: __init__