main.py 文件源码

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

项目:SGAN 作者: YuhangSong 项目源码 文件源码
def vector2image(x):
    block_size = chris_domain.BLOCK_SIZE*3
    x_temp = torch.FloatTensor(
        x.size()[0],
        x.size()[1],
        1,
        block_size,
        params['GRID_SIZE']*block_size
    ).cuda().fill_(0.0)
    for b in range(x.size()[0]):
        for d in range(x.size()[1]):
            for i in range(x.size()[2]):
                from_ = i*block_size
                to_ = (i+1)*block_size
                fill_ = float(x[b][d][i])
                x_temp[b,d,0,:,from_:to_].fill_(fill_)
    return x_temp
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号