5618ab9c3d550a0bd4112f6c0b76f657ee220703,thinc/loss.py,SequenceCategoricalCrossentropy,get_grad,#SequenceCategoricalCrossentropy#,151

Before Change


        err = "Cannot calculate SequenceCategoricalCrossentropy loss: guesses and truths must be same length"
        if len(guesses) != len(truths):  // pragma: no cover
            raise ValueError(err)
        n = sum(yh.shape[0] for yh in guesses)
        d_scores = []
        for yh, y in zip(guesses, truths):
            d_yh = self.cc.get_grad(yh, y)
            if self.normalize:

After Change


        err = "Cannot calculate SequenceCategoricalCrossentropy loss: guesses and truths must be same length"
        if len(guesses) != len(truths):  // pragma: no cover
            raise ValueError(err)
        n = len(guesses)
        d_scores = []
        for yh, y in zip(guesses, truths):
            d_yh = self.cc.get_grad(yh, y)
            if self.normalize:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 6

Instances


Project Name: explosion/thinc
Commit Name: 5618ab9c3d550a0bd4112f6c0b76f657ee220703
Time: 2020-07-07
Author: honnibal+gh@gmail.com
File Name: thinc/loss.py
Class Name: SequenceCategoricalCrossentropy
Method Name: get_grad


Project Name: astroML/astroML
Commit Name: 4e70cb5fc9a9494e866ccd7d2e1a9046091b6337
Time: 2018-11-16
Author: bsipocz@gmail.com
File Name: astroML/density_estimation/gauss_mixture.py
Class Name: GaussianMixture1D
Method Name: __init__


Project Name: GPflow/GPflow
Commit Name: f31a914bd38b00affc978d7ef1834e1303af5b4c
Time: 2018-09-20
Author: art.art.v@gmail.com
File Name: gpflow/models/model.py
Class Name: GPModel
Method Name: __init__


Project Name: kevinzakka/recurrent-visual-attention
Commit Name: 520e8fb57b890a7249334d9e90c9ad209d0b849f
Time: 2018-02-10
Author: kevinarmandzakka@gmail.com
File Name: modules.py
Class Name: retina
Method Name: foveate


Project Name: keras-team/keras-preprocessing
Commit Name: 75c9e8cbcd9da21591cd5f8aaaa99205f48fa606
Time: 2021-01-19
Author: eli.osherovich@gmail.com
File Name: keras_preprocessing/image/image_data_generator.py
Class Name: ImageDataGenerator
Method Name: fit