From 816492a12e01633bc7eb1b7a424b39b3d9b356be Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Wed, 13 Sep 2023 18:02:14 +0200 Subject: [PATCH] TF test_reclayer_optimize_out_pos_enc_layer --- tests/test_TFNetworkRecLayer.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_TFNetworkRecLayer.py b/tests/test_TFNetworkRecLayer.py index 3d2eb032a5..211becec41 100644 --- a/tests/test_TFNetworkRecLayer.py +++ b/tests/test_TFNetworkRecLayer.py @@ -7304,6 +7304,19 @@ def test_reclayer_optimize_out_cumsum_unrelated_axis(): ) +def test_reclayer_optimize_out_pos_enc_layer(): + feat_dim = FeatureDim("feat", dimension=11) + check_reclayer_optimize_out( + feat_dim=feat_dim, + subnet_layer_dict={ + "class": "positional_encoding", + "out_dim": feat_dim, + "from": "data:source", + "add_to_input": True, + }, + ) + + def test_reclayer_optimize_out_rel_pos_enc_layer(): # https://github.com/rwth-i6/returnn/issues/1253 time_dim = SpatialDim("time")