93cfd8bd22d6b798b94aead3c8ea75ace2727265,chainercv/functions/ps_roi_max_align_2d.py,PSROIMaxAlign2D,forward_cpu,#PSROIMaxAlign2D#Any#,95
Before Change
maxval = -1e20
maxidx = -1
iy = 0
while iy < roi_bin_grid_h:
y = roi_start_h + ph * bin_size_h + \
(iy + .5) * bin_size_h / roi_bin_grid_h
ix = 0
while ix < roi_bin_grid_w:
x = roi_start_w + pw * bin_size_w + \
(ix + .5) * bin_size_w / roi_bin_grid_w
// bilinear interpolation {{
y_low, x_low, y_high, x_high, w1, w2, w3, w4 = \
_get_bilinear_interp_params(y, x, height, width)
if y_low is None:
continue
v1 = bottom_data[roi_batch_ind, c, y_low, x_low]
v2 = bottom_data[roi_batch_ind, c, y_low, x_high]
v3 = bottom_data[roi_batch_ind, c, y_high, x_low]
v4 = bottom_data[roi_batch_ind, c, y_high, x_high]
tmpval = w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4
bottom_index = iy * roi_bin_grid_w + ix
if (tmpval > maxval):
maxval = tmpval
maxidx = bottom_index
ix += 1
iy += 1
top_data[n, ctop, ph, pw] = maxval
self.argmax_data[n, ctop, ph, pw] = maxidx
return top_data,
After Change
y = roi_start_h + ph * bin_size_h + \
(iy + .5) * bin_size_h / roi_bin_grid_h
y, y_low, y_high = _get_bounds(y, height)
if y is None o r y_low is None or y_high is None:
continue
for ix in six.moves.range(roi_bin_grid_w):
x = roi_start_w + pw * bin_size_w + \
(ix + .5) * bin_size_w / roi_bin_grid_w
x, x_low, x_high = _get_bounds(x, width)
if x is None or x_low is None or x_high is None:
continue
// bilinear interpolation {{
w1, w2, w3, w4 = _get_bilinear_interp_params(
y, x, y_low, x_low, y_high, x_high)
v1 = bottom_data[roi_batch_ind, c, y_low, x_low]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances Project Name: chainer/chainercv
Commit Name: 93cfd8bd22d6b798b94aead3c8ea75ace2727265
Time: 2019-02-18
Author: shingogo@hotmail.co.jp
File Name: chainercv/functions/ps_roi_max_align_2d.py
Class Name: PSROIMaxAlign2D
Method Name: forward_cpu
Project Name: chainer/chainercv
Commit Name: 93cfd8bd22d6b798b94aead3c8ea75ace2727265
Time: 2019-02-18
Author: shingogo@hotmail.co.jp
File Name: chainercv/functions/ps_roi_max_align_2d.py
Class Name: PSROIMaxAlign2D
Method Name: forward_cpu
Project Name: ray-project/ray
Commit Name: b2bcab711d333442c282cf64c66a9fac2c93218f
Time: 2020-12-20
Author: sven@anyscale.io
File Name: rllib/utils/sgd.py
Class Name:
Method Name: minibatches
Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 42ad0f227fa39fe9b96bc3e08b2e5704dc157e74
Time: 2018-06-26
Author: xravitejax@gmail.com
File Name: open_seq2seq/encoders/w2l_encoder.py
Class Name: Wave2LetterEncoder
Method Name: _encode