d6b449edcbdaf559807aaff6bd3234f47134e303,pyannote/audio/embedding/approaches/center_loss.py,CenterLoss,loss_and_grad,#CenterLoss#Any#Any#,206
Before Change
X = batch["X"]
y = batch["y"]
fX = embed(X)
func = value_and_multigrad(self.loss, argnums=[0, 1])
loss, (fX_grad, fC_grad) = func(fX, self.fC_, y)
After Change
fX = self.embed(embedding, batch["X"], internal=True)
func = value_and_multigrad(self.loss_z, argnums=[0, 1])
loss, (fX_grad, fC_grad) = func(fX, self.fC_, batch["y"],
batch["n"])
fX_grad = fX_grad[:, 0, :]
else:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 2
Instances
Project Name: pyannote/pyannote-audio
Commit Name: d6b449edcbdaf559807aaff6bd3234f47134e303
Time: 2017-05-11
Author: bredin@limsi.fr
File Name: pyannote/audio/embedding/approaches/center_loss.py
Class Name: CenterLoss
Method Name: loss_and_grad
Project Name: theislab/scanpy
Commit Name: 9e89e0a6576c8ae04ce97c296fe8fd9dc5ee419f
Time: 2017-02-13
Author: f.alex.wolf@gmx.de
File Name: scanpy/tests/graph.py
Class Name:
Method Name: test_distance_metrics
Project Name: dpressel/mead-baseline
Commit Name: 78eba7b3f82b8420deac3cd28318dbfead0f9b9e
Time: 2018-10-30
Author: dpressel@gmail.com
File Name: python/baseline/pytorch/seq2seq/model.py
Class Name: Seq2SeqModel
Method Name: encode
Project Name: facebookresearch/SentEval
Commit Name: 8a486fdfa2a2364641b290ced4d81c51f64cf175
Time: 2018-10-04
Author: aconneau@fb.com
File Name: examples/googleuse.py
Class Name:
Method Name: batcher