Skip to content

Commit

Permalink
Data copy_compatible_to TODO replace dim tag
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Mar 4, 2022
1 parent fcecd20 commit 6723531
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions returnn/tf/util/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3843,6 +3843,7 @@ def copy_replace_dim_tag(self, axis, new_dim_tag):
mask_t = mask.placeholder # [T,B], e.g. [1,0,1] (ignoring batch-dim for example)
# Also see UnmaskLayer.
idxs = tf.cumsum(tf.cast(mask_t, tf.int32), axis=0) # [T,B], e.g. [1,1,2]
# TODO need to get initial ... how?
initial_bc = tf.reshape(0., shape=[1] * self.batch_ndim) # add bc dims
src = self
if axis != 0:
Expand Down

0 comments on commit 6723531

Please sign in to comment.