def layer_avg_pool(self, net, args, options):
options = hc.Config(options)
stride=options.stride or self.ops.shape(net)[1]
stride=int(stride)
ksize = [1,stride,stride,1]
if options.slice:
size = [int(x) for x in options.slice.replace("batch_size",str(self.gan.batch_size())).split("*")]
net = tf.slice(net, [0,0,0,0], size)
net = tf.nn.avg_pool(net, ksize=ksize, strides=ksize, padding="SAME")
return net
def layer_combine_features(self, net, args, options):
op = None