dcc5890dc2773090ab46a5e8bdd981a1104d9273,bindsnet/evaluation/__init__.py,,update_ngram_scores,#Any#Any#Any#Any#Any#,191

Before Change


            fire_order += ordering

        // Add counts for every n-gram
        for i in range(1, n+1):
            for beg in range(len(fire_order)-i+1):
                // For every ordering based on n (i)
                if tuple(fire_order[beg : beg+i]) not in ngram_scores:
                    ngram_scores[tuple(fire_order[beg : beg+i])] = torch.zeros(n_labels)
                ngram_scores[tuple(fire_order[beg : beg+i])][int(gold_labels[n_ex])] += 1

    return ngram_scores

After Change


        // Aggregate all of the firing neurons" indices
        for t in range(activity.size()[0]):
            ordering = torch.nonzero(activity[t].view(-1))
            if ordering.numel() > 0:
                ordering = ordering[:, 0].tolist()
                fire_order += ordering
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: BindsNET/bindsnet
Commit Name: dcc5890dc2773090ab46a5e8bdd981a1104d9273
Time: 2018-06-29
Author: djsaunde@umass.edu
File Name: bindsnet/evaluation/__init__.py
Class Name:
Method Name: update_ngram_scores


Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: gpytorch/utils/eig.py
Class Name:
Method Name: batch_symeig


Project Name: rusty1s/pytorch_geometric
Commit Name: 69dd0827d09eae0b4e6b95df854b2814175c9248
Time: 2019-04-10
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/autoencoder.py
Class Name: GAE
Method Name: negative_sampling