From 2dff1fd5fdb09a7ba945a8e3c078ddd57391201a Mon Sep 17 00:00:00 2001 From: xiaohou Date: Thu, 18 Nov 2021 16:04:43 +0800 Subject: [PATCH] Update max_pooling_RHE.py --- kws/model/max_pooling_RHE.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kws/model/max_pooling_RHE.py b/kws/model/max_pooling_RHE.py index b78568f..2105c9e 100644 --- a/kws/model/max_pooling_RHE.py +++ b/kws/model/max_pooling_RHE.py @@ -17,7 +17,8 @@ import torch import numpy as np 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: index: indice of @@ -77,8 +78,7 @@ def max_pooling_RHE_binary_CE(logits, """Max-pooling loss with regional hard example mining For each keyword utterance, select the frame with the highest posterior. 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. Attributes: