cb89711536f566f3ed7d121520fe32ad41ca83bc,finetune/association.py,Association,predict,#Association#Any#,136

Before Change


            batch_probas.append(pred["sequence_probs"])
            print("probs shape is ", pred["association_probs"].shape)

            most_likely_associations = np.argmax(pred["association"], 0)
            most_likely_class_id = pred["association"][range(len(most_likely_associations)), tuple(most_likely_associations)]
            print([prob[idx, cls] for prob, idx, cls in zip(pred["association_probs"], most_likely_associations, most_likely_class_id)])

            associations.append((
                most_likely_associations,

After Change


        arr_encoded = list(itertools.chain.from_iterable(self.input_pipeline._text_to_ids([x]) for x in X))
        labels, batch_probas, associations = [], [], []
        for pred in self._inference(X, mode=None):
            pred_labels = self.input_pipeline.label_encoder.inverse_transform(pred["sequence"])
            labels.append(pred_labels)
            batch_probas.append(pred["sequence_probs"])
            pred["association_probs"] = self.prune_probs(pred["association_probs"], pred_labels)
            most_likely_associations, most_likely_class_id = zip(*[np.unravel_index(np.argmax(a, axis=None), a.shape) for a in pred["association_probs"]])
            associations.append((
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: cb89711536f566f3ed7d121520fe32ad41ca83bc
Time: 2019-01-11
Author: benlt@hotmail.co.uk
File Name: finetune/association.py
Class Name: Association
Method Name: predict


Project Name: glm-tools/pyglmnet
Commit Name: 8442ee853b9cb7813689d9dfb381af0976bc5825
Time: 2017-03-28
Author: pavan.ramkumar@gmail.com
File Name: pyglmnet/pyglmnet.py
Class Name: GLM
Method Name: predict


Project Name: rusty1s/pytorch_geometric
Commit Name: ab1d74868183e211b8ae7aa155cdcbb5f43843d8
Time: 2020-05-27
Author: matthias.fey@tu-dortmund.de
File Name: examples/cluster_gcn.py
Class Name:
Method Name: test