File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
from typing import Optional , Tuple , List
6
6
from returnn .util .basic import NotSpecified
7
+ from .. import nn
7
8
from .base import LayerRef , Layer
8
9
9
10
@@ -21,6 +22,18 @@ def concat(*sources: LayerRef,
21
22
raise NotImplementedError (f"Cannot handle concat with axis { axis !r} yet" )
22
23
23
24
25
+ def rec_cum_concat (
26
+ source : LayerRef , * , state : nn .LayerState ,
27
+ new_dim : nn .DimensionTag ,
28
+ name : Optional [str ] = None ) -> Tuple [Layer , nn .LayerState ]:
29
+ """
30
+ Concatenates all previous frames of a time-axis.
31
+ See RETURNN :class:`CumConcatLayer` for details.
32
+ """
33
+ from ._generated_layers import _cum_concat
34
+ return _cum_concat (source = source , state = state , new_dim = new_dim , name = name )
35
+
36
+
24
37
def split (source : LayerRef , * ,
25
38
axis : Optional [str ] = NotSpecified ,
26
39
num_splits : Optional [int ] = NotSpecified ,
You can’t perform that action at this time.
0 commit comments