Update max_pooling_RHE.py
This commit is contained in:
parent
f98da24382
commit
2dff1fd5fd
@ -17,7 +17,8 @@ import torch
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
def RHE(indice: torch.Tensor, k: int):
|
def RHE(indice: torch.Tensor, k: int):
|
||||||
"""Regional hard example mining from 'Mining effective negative training samples for keyword spotting'
|
"""Regional hard example mining from
|
||||||
|
'Mining effective negative training samples for keyword spotting'
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
index: indice of
|
index: indice of
|
||||||
@ -77,7 +78,6 @@ def max_pooling_RHE_binary_CE(logits,
|
|||||||
"""Max-pooling loss with regional hard example mining
|
"""Max-pooling loss with regional hard example mining
|
||||||
For each keyword utterance, select the frame with the highest posterior.
|
For each keyword utterance, select the frame with the highest posterior.
|
||||||
The keyword is triggered when any of the frames is triggered.
|
The keyword is triggered when any of the frames is triggered.
|
||||||
|
|
||||||
For each non-keyword utterance, select several hard examples using the
|
For each non-keyword utterance, select several hard examples using the
|
||||||
RHE algorithm.
|
RHE algorithm.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user