100a265d7f0324bff1cce2f084cf23fc44bcc2c5,lower_triangular_matrix.py,,_set_batch_non_diagonal,#Any#Any#,29
Before Change
def _set_batch_non_diagonal(array, non_diag_val):
batch_size , m, n = array.shape
assert m == n
rows, cols = np.tril_indices(n, -1)
array[:, rows, cols] = non_diag_val
After Change
def _set_batch_non_diagonal(array, diag_val):
xp = cuda.get_array_module(array)
if xp == np:
_set_batch_non_diagonal_cpu(array, diag_val)
else:
_set_batch_non_diagonal_gpu(array, diag_val)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances Project Name: chainer/chainerrl
Commit Name: 100a265d7f0324bff1cce2f084cf23fc44bcc2c5
Time: 2016-06-06
Author: muupan@gmail.com
File Name: lower_triangular_matrix.py
Class Name:
Method Name: _set_batch_non_diagonal
Project Name: chainer/chainerrl
Commit Name: 100a265d7f0324bff1cce2f084cf23fc44bcc2c5
Time: 2016-06-06
Author: muupan@gmail.com
File Name: lower_triangular_matrix.py
Class Name:
Method Name: _set_batch_diagonal
Project Name: chainer/chainercv
Commit Name: 0d4f3c5904b406312e2c9333308dd508da6c1ffc
Time: 2017-05-08
Author: yuyuniitani@gmail.com
File Name: chainercv/evaluations/eval_semantic_segmentation.py
Class Name:
Method Name: eval_semantic_segmentation
Project Name: pfnet-research/chainer-chemistry
Commit Name: c977c0b4542a50a71fa2913bda2a99ddc128a1e9
Time: 2018-06-20
Author: mottodora@gmail.com
File Name: chainer_chemistry/functions/mean_absolute_error.py
Class Name: MeanAbsoluteError
Method Name: backward