(seq)
return seq[:, tf.newaxis, tf.newaxis, :]
create padding mask
create padding mask
create padding mask
def create_padding_mask(seq):
  """
  create padding mask
  """
  seq = tf.cast(tf.math.equal(seq, 0), tf.float32)
  return seq[:, tf.newaxis, tf.newaxis, :]
def create_padding_mask ( seq ) : seq = tf . cast ( tf . math . equal ( seq , 0 ) , tf . float32 ) return seq [ : , tf . newaxis , tf . newaxis , : ]