import tensorflow as tf

            if type(a[0]) == tf.Tensor:
                return tf.stack(a, 0)
            else:
                return tf.constant(a, dtype)
        else:
            print(type(a))
            return tf.constant(a, dtype)

    return sbnet_module.reduce_mask(
        mask,
        block_params.bcount,
        dynamic_bsize=to_tensor(block_params.bsize, tf.int32),
