68fe96add85bd842df23569dde490e1694d256fe,cleverhans/model_zoo/deep_k_nearest_neighbors/dknn.py,DkNNModel,find_train_knns,#DkNNModel#,134

Before Change


          knns_ind[layer][i, :] = query_res
        except:  // pylint: disable-msg=W0702
          knns_ind[layer][i, :len(query_res)] = query_res
          knn_errors += knns_ind[layer].shape[1] - len(query_res)

      // Find labels of neighbors found in the training data.
      knns_labels[layer] = np.zeros((nb_data, self.neighbors), dtype=np.int32)
      for data_id in range(nb_data):

After Change


        data_activations_layer, self.neighbors
      )

      d1 = neighbor_index.reshape(-1)
      m1 = d1 == -1

      knns_ind[layer].reshape(-1)[
        numpy.logical_not(m1)
      ] = d1[
        numpy.logical_not(m1)
      ]

      knn_erros = numpy.sum(m1)

      // Find labels of neighbors found in the training data.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: tensorflow/cleverhans
Commit Name: 68fe96add85bd842df23569dde490e1694d256fe
Time: 2019-06-21
Author: siarheisiniak@yahoo.com
File Name: cleverhans/model_zoo/deep_k_nearest_neighbors/dknn.py
Class Name: DkNNModel
Method Name: find_train_knns


Project Name: scikit-learn-contrib/DESlib
Commit Name: f0c15f219b0761b14329ddd416cda82fa4bae841
Time: 2018-03-28
Author: rafaelmenelau@gmail.com
File Name: deslib/dcs/mcb.py
Class Name: MCB
Method Name: estimate_competence


Project Name: stared/livelossplot
Commit Name: 77fd9f4fbde745fa239fc73bd0b9f203d5dabf2b
Time: 2020-07-13
Author: bartlomiej.olechno@gmail.com
File Name: livelossplot/outputs/matplotlib_plot.py
Class Name: MatplotlibPlot
Method Name: send


Project Name: scikit-learn-contrib/DESlib
Commit Name: cd1a5446ce793d09f28d021c466a279301eb51f0
Time: 2018-04-01
Author: rafaelmenelau@gmail.com
File Name: deslib/des/meta_des.py
Class Name: METADES
Method Name: select