47478c01bde169ebb7595bbc0189a751db3e0610,pyannote/audio/labeling/base.py,SequenceLabeling,postprocess_ndarray,#SequenceLabeling#Any#,107
Before Change
Batch of sequence labelings.
if isinstance(self.model, nn.Module):
X = Variable(torch.from_numpy(np.rollaxis(np.array(X, dtype=np.float32), 0, 2)))
if self.gpu:
prediction = self.model(X.cuda()).data.cpu().numpy()
else:
prediction = self.model(X).data.numpy()
After Change
Batch of sequence labelings.
if isinstance(self.model, nn.Module):
if not getattr(self.model, "batch_first", True):
X = np.rollaxis(X, 0, 2)
X = np.array(X, dtype=np.float32)
X = Variable(torch.from_numpy(X))
if self.gpu:
prediction = self.model(X.cuda()).data.cpu().numpy()
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
Instances
Project Name: pyannote/pyannote-audio
Commit Name: 47478c01bde169ebb7595bbc0189a751db3e0610
Time: 2018-02-22
Author: bredin@limsi.fr
File Name: pyannote/audio/labeling/base.py
Class Name: SequenceLabeling
Method Name: postprocess_ndarray
Project Name: pyannote/pyannote-audio
Commit Name: 47478c01bde169ebb7595bbc0189a751db3e0610
Time: 2018-02-22
Author: bredin@limsi.fr
File Name: pyannote/audio/embedding/extraction.py
Class Name: SequenceEmbedding
Method Name: postprocess_ndarray
Project Name: pyannote/pyannote-audio
Commit Name: 47478c01bde169ebb7595bbc0189a751db3e0610
Time: 2018-02-22
Author: bredin@limsi.fr
File Name: pyannote/audio/embedding/approaches/triplet_loss.py
Class Name: TripletLoss
Method Name: fit