File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3241,9 +3241,15 @@ def get_loop_acc_layer(name):
32413241 search_choices_cache = search_choices_cache )
32423242 # Use the output Data from the in-loop layer,
32433243 # as this might have set dyn sizes on dim tags.
3244+ time_dim_tag = DimensionTag .get_tag_from_size_tensor (resolved_seq_len )
3245+ if not time_dim_tag :
3246+ time_dim_tag = DimensionTag (
3247+ kind = DimensionTag .Types .Spatial ,
3248+ description = "dyn-time:%s/%s" % (self .parent_rec_layer .get_full_ctx_name (), name ))
32443249 output = (
32453250 in_loop_layer .output
3246- .copy_template_adding_time_dim (time_dim_axis = 0 )
3251+ .copy_template ()
3252+ .copy_add_dim_by_tag (time_dim_tag , unbroadcast = True , axis = 0 )
32473253 .copy_template_set_ctx (self .parent_net .get_control_flow_ctx ()))
32483254 if latest_layer_choice_name :
32493255 output .beam = self .net .layers [latest_layer_choice_name ].search_choices .get_beam_info ()
You can’t perform that action at this time.
0 commit comments