utils.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:LifelongVAE 作者: jramapuram 项目源码 文件源码
def shuffle_jointly(*args):
    '''
    accepts n args, concatinates them all together
    and then shuffles along batch_dim and returns them unsplit
    '''
    shps = [a.get_shape().as_list()[-1] for a in args]
    concated = tf.random_shuffle(tf.concat(values=args, axis=1))
    splits = []
    current_max = 0
    for begin in shps:
        splits.append(concated[:, current_max:current_max + begin])
        current_max += begin

    return splits
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号