(self, outer_masks, input_pianorolls)
return outer_masks
Returns outer masks, if all zeros created by completion masking.
Returns outer masks, if all zeros created by completion masking.
Returns outer masks if all zeros created by completion masking .
def make_outer_masks(self, outer_masks, input_pianorolls):
    """Returns outer masks, if all zeros created by completion masking."""
    outer_masks = tf.to_float(outer_masks)
    # If outer_masks come in as all zeros, it means there's no masking,
    # which also means nothing will be generated. In this case, use
    # completion mask to make new outer masks.
    outer_masks = tf.cond(
        tf.reduce_all(tf.equal(outer_masks, 0)),
        lambda: make_completion_masks(input_pianorolls),
        lambda: outer_masks)
    return outer_masks
def make_outer_masks ( self , outer_masks , input_pianorolls ) : outer_masks = tf . to_float ( outer_masks ) # If outer_masks come in as all zeros, it means there's no masking, # which also means nothing will be generated. In this case, use # completion mask to make new outer masks. outer_masks = tf . cond ( tf . reduce_all ( tf . equal ( outer_masks , 0 ) ) , lambda : make_completion_masks ( input_pianorolls ) , lambda : outer_masks ) return outer_masks