9839074274ee9d16e535ba86625e64e3f28bfd66,chainercv/functions/ps_roi_max_align_2d.py,PSROIMaxAlign2D,__init__,#PSROIMaxAlign2D#Any#Any#Any#Any#,38

Before Change


            group_size, sampling_ratio=None
    ):
        out_c, out_h, out_w = _outsize(outsize)
        if out_c is not None and not (isinstance(out_c, int) and out_c > 0):
            raise TypeError(
                "outsize[0] must be positive integer: {}, {}"
                .format(type(out_c), out_c))
        if not (isinstance(out_h, int) and out_h > 0):
            raise TypeError(
                "outsize[1] must be positive integer: {}, {}"
                .format(type(out_h), out_h))
        if not (isinstance(out_w, int) and out_w > 0):
            raise TypeError(
                "outsize[2] must be positive integer: {}, {}"
                .format(type(out_w), out_w))
        if isinstance(spatial_scale, int):
            spatial_scale = float(spatial_scale)
        if not (isinstance(group_size, int) and group_size > 0):
            raise TypeError(
                "group_size must be positive integer: {}, {}"
                .format(type(group_size), group_size))
        if not (isinstance(spatial_scale, float) and spatial_scale > 0):
            raise TypeError(
                "spatial_scale must be a positive float number: {}, {}"
                .format(type(spatial_scale), spatial_scale))
        sampling_ratio = _pair(sampling_ratio)
        if not all((isinstance(s, int) and s >= 1) or s is None
                   for s in sampling_ratio):
            raise TypeError(
                "sampling_ratio must be integer >= 1 or a pair of it: {}"

After Change


    ):
        out_c, out_h, out_w = _outsize(outsize)
        if out_c is not None and \
                not (np.issubdtype(type(out_c), np.integer) and out_c > 0):
            raise TypeError(
                "outsize[0] must be positive integer: {}, {}"
                .format(type(out_c), out_c))
        if not (np.issubdtype(type(out_h), np.integer) and out_h > 0):
            raise TypeError(
                "outsize[1] must be positive integer: {}, {}"
                .format(type(out_h), out_h))
        if not (np.issubdtype(type(out_w), np.integer) and out_w > 0):
            raise TypeError(
                "outsize[2] must be positive integer: {}, {}"
                .format(type(out_w), out_w))
        if np.issubdtype(type(spatial_scale), np.integer):
            spatial_scale = float(spatial_scale)
        if not (np.issubdtype(type(spatial_scale), np.floating)
                and spatial_scale > 0):
            raise TypeError(
                "spatial_scale must be a positive float number: {}, {}"
                .format(type(spatial_scale), spatial_scale))
        if not (np.issubdtype(type(group_size), np.integer)
                and group_size > 0):
            raise TypeError(
                "group_size must be positive integer: {}, {}"
                .format(type(group_size), group_size))
        sampling_ratio = _pair(sampling_ratio)
        if not all((np.issubdtype(type(s), np.integer) and s >= 1) or s is None
                   for s in sampling_ratio):
            raise TypeError(
                "sampling_ratio must be integer >= 1 or a pair of it: {}"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 16

Instances


Project Name: chainer/chainercv
Commit Name: 9839074274ee9d16e535ba86625e64e3f28bfd66
Time: 2019-03-27
Author: shingogo@hotmail.co.jp
File Name: chainercv/functions/ps_roi_max_align_2d.py
Class Name: PSROIMaxAlign2D
Method Name: __init__


Project Name: chainer/chainercv
Commit Name: a15ffa4413cdbd6d981488c16f1fcffd5ec27189
Time: 2019-03-27
Author: shingogo@hotmail.co.jp
File Name: chainercv/functions/ps_roi_average_align_2d.py
Class Name: PSROIAverageAlign2D
Method Name: __init__


Project Name: chainer/chainercv
Commit Name: 76b029e89af967c029591ce8f8b60760f08a97d2
Time: 2019-03-27
Author: shingogo@hotmail.co.jp
File Name: chainercv/functions/ps_roi_average_pooling_2d.py
Class Name: PSROIAveragePooling2D
Method Name: __init__