322f71f0f8c06a738c47cf825f8726ee5f1f496a,lib/discriminators/pyramid_nostride_discriminator.py,,discriminator,#Any#Any#Any#Any#Any#,6
Before Change
filter_size_h = 2
if(i==depth-1):
filter_size_w=int(result.get_shape()[1])
filter_size_h=int(result.get_shape()[2])
filter = [1,filter_size_w,filter_size_h,1]
stride = [1,filter_size_w,filter_size_h,1]
result = conv2d(result, int(int(result.get_shape()[3])*depth_increase), name="d_expand_layer"+str(i), k_w=3, k_h=3, d_h=1, d_w=1)
result = tf.nn.avg_pool(result, ksize=filter, strides=stride, padding="SAME")
After Change
// APPEND xs[i] and gs[i]
if(i < len(xs) and i > 0):
xg = tf.concat(0, [xs[i], gs[i]])
xg += tf.random_normal(xg.get_shape(), mean=0, stddev=config["discriminator.noise_stddev"]*i, dtype=config["dtype"])
xgs.append(xg)
mxg = conv2d(xg, 6*(i), name="d_add_xg"+str(i), k_w=3, k_h=3, d_h=1, d_w=1)
mxg = batch_norm(config["batch_size"], name="d_add_xg_bn_"+str(i))(mxg)
mxg = activation(mxg)
xgs_conv.append(mxg)
net = tf.concat(3, [net, xg])
filter_size_w = 2
filter_size_h = 2
filter = [1,filter_size_w,filter_size_h,1]
stride = [1,filter_size_w,filter_size_h,1]
net = conv2d(net, int(int(net.get_shape()[3])*depth_increase), name="d_expand_layer"+str(i), k_w=3, k_h=3, d_h=1, d_w=1)
net = tf.nn.avg_pool(net, ksize=filter, strides=stride, padding="SAME")
print("Discriminator pyramid layer:", net)
k=-1
net = batch_norm(config["batch_size"]*2, name="d_expand_bn_end_"+str(i))(net)
net = activation(net)
net = tf.reshape(net, [batch_size, -1])
net = linear(net, int(1024*1.5), scope="d_fc_end1")
net = batch_norm(config["batch_size"]*2, name="d_bn_end1")(net)
net = activation(net)
net = linear(net, 1024, scope="d_fc_end2")
net = batch_norm(config["batch_size"]*2, name="d_bn_end2")(net)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: HyperGAN/HyperGAN
Commit Name: 322f71f0f8c06a738c47cf825f8726ee5f1f496a
Time: 2016-11-11
Author: martyn@255bits.com
File Name: lib/discriminators/pyramid_nostride_discriminator.py
Class Name:
Method Name: discriminator
Project Name: HyperGAN/HyperGAN
Commit Name: a02527e58d09b7f86575f5b790db1fa9dbc8e4e6
Time: 2016-10-29
Author: martyn@255bits.com
File Name: lib/gan.py
Class Name:
Method Name: discriminator
Project Name: HyperGAN/HyperGAN
Commit Name: 1aa6f71331656a09a2cc5a6f85a584ee362cedae
Time: 2016-11-26
Author: martyn@255bits.com
File Name: lib/discriminators/pyramid_discriminator.py
Class Name:
Method Name: discriminator