55b557f17385ca10b8a3e8fb8bbb0d3799906db5,src/sdk/pynni/nni/compression/tensorflow/builtin_pruners.py,FPGMPruner,_get_min_gm_kernel_idx,#FPGMPruner#Any#Any#,177
Before Change
dist_list.append(dist_sum)
idx_list.append([in_i, out_i])
dist_tensor = tf.convert_to_tensor(dist_list)
idx_tensor = tf.constant(idx_list)
_, idx = tf.math.top_k(dist_tensor, k=n)
return tf.gather(idx_tensor, idx)
After Change
for in_i in range(weight.shape[0]):
for out_i in range(weight.shape[1]):
dist_sum = self._get_distance_sum(weight, in_i, out_i)
dist_list.append((dist_sum, (in_i, out_i) ))
min_gm_kernels = sorted(dist_list, key=lambda x: x[0])[:n]
return [x[1] for x in min_gm_kernels]
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 3
Instances Project Name: microsoft/nni
Commit Name: 55b557f17385ca10b8a3e8fb8bbb0d3799906db5
Time: 2019-11-20
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: src/sdk/pynni/nni/compression/tensorflow/builtin_pruners.py
Class Name: FPGMPruner
Method Name: _get_min_gm_kernel_idx
Project Name: GPflow/GPflow
Commit Name: 1ebcba3853b9ca0c62852da765601b93e935093a
Time: 2016-10-26
Author: james.hensman@gmail.com
File Name: GPflow/transforms.py
Class Name: Logistic
Method Name: __init__
Project Name: tensorlayer/tensorlayer
Commit Name: 4d6cb5a6ea1fc8632a96591582b88d7088fafbf2
Time: 2019-05-11
Author: yingda.yin@gmail.com
File Name: tensorlayer/layers/normalization.py
Class Name: InstanceNorm
Method Name: build
Project Name: uber/ludwig
Commit Name: 15bc4baff9c2dfa2e42947a417e45a159ab50dad
Time: 2020-05-14
Author: w4nderlust@gmail.com
File Name: ludwig/models/modules/embedding_modules.py
Class Name: EmbedSparse
Method Name: __call__
Project Name: uber/ludwig
Commit Name: 66866187ee32e7ec2f1e93cbd39a21a0afd1ccd3
Time: 2020-05-09
Author: w4nderlust@gmail.com
File Name: ludwig/models/modules/embedding_modules.py
Class Name: EmbedSparse
Method Name: call