fix stride for 1d maxpooling (#5710)

* fix stride for 1d maxpooling

* fix test
This commit is contained in:
Svetlana Dolinina 2021-05-21 11:57:40 +03:00 committed by GitHub
parent af915859e3
commit 8e956654bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ class MaxPoolingComponentFrontExtractor(FrontExtractorOp):
mapping_rule = {
'window': np.array([1, 1, 1, kernel], dtype=np.int64),
'stride': np.array([1, 1, stride, stride], dtype=np.int64),
'stride': np.array([1, 1, 1, stride], dtype=np.int64),
'pool_stride': pool_stride,
'pool_step': pool_step,
'pad': np.array([[0, 0], [0, 0], [0, 0], [0, 0]], dtype=np.int64),

View File

@ -27,7 +27,7 @@ class MaxPoolingComponentFrontExtractorTest(KaldiFrontExtractorTest):
def test_attrs(self):
val_attrs = {
'window': [1, 1, 1, 2],
'stride': [1, 1, 2, 2],
'stride': [1, 1, 1, 2],
'pool_stride': 4,
'pad': [[[0, 0], [0, 0], [0, 0], [0, 0]]]
}