gan_component.py 文件源码

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

项目:HyperGAN 作者: 255BITS 项目源码 文件源码
def relation_layer(self, net):
        ops = self.ops

        #hack
        shape = ops.shape(net)
        input_size = shape[1]*shape[2]*shape[3]

        netlist = self.split_by_width_height(net)
        permutations = self.permute(netlist, 2)
        permutations = self.fully_connected_from_list(permutations)
        net = ops.concat(permutations, axis=3)

        #hack
        bs = ops.shape(net)[0]
        net = ops.reshape(net, [bs, -1])
        net = ops.linear(net, input_size)
        net = ops.reshape(net, shape)

        return net
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号