a02527e58d09b7f86575f5b790db1fa9dbc8e4e6,lib/gan.py,,discriminator,#Any#Any#Any#Any#Any#Any#,46
Before Change
last_layer = tf.reshape(last_layer, [batch_size, -1])
last_layer = tf.slice(last_layer, [single_batch_size, 0], [single_batch_size, -1])
net = tf.reshape(net, [config["batch_size"]*2, -1])
net = tf.concat(1, [net]+regularizers)
s = [int(x) for x in net.get_shape()]
net = tf.reshape(net, [s[0], 1, 1, s[1]])
net = conv2d(net, int(net.get_shape()[3]), name="d_endd2", k_w=1, k_h=1, d_h=1, d_w=1, stddev=0.1)
net = tf.reshape(net, [config["batch_size"]*2, -1])
net = tf.reduce_mean(net, 1)
net = tf.reshape(net, [config["batch_size"]*2, 1])
class_logits = net
gan_logits = net
return [tf.slice(class_logits, [0, 0], [single_batch_size, 1]),
tf.slice(gan_logits, [0,0], [single_batch_size,1]),
tf.slice(class_logits, [single_batch_size, 0], [single_batch_size, 1]),
tf.slice(gan_logits, [single_batch_size,0], [single_batch_size,1]),
last_layer]
net = linear(net, config["y_dims"]+1, scope="d_proj", stddev=0.002)
def build_logits(class_logits, num_classes):
generated_class_logits = tf.squeeze(tf.slice(class_logits, [0, num_classes - 1], [batch_size, 1]))
positive_class_logits = tf.slice(class_logits, [0, 0], [batch_size, num_classes - 1])
After Change
regularizers = []
for regularizer in config["discriminator.regularizers"]:
regs = regularizer(config, net)
regularizers += [tf.reshape(r,[int(r.get_shape()[0]),1,1,int(r.get_shape()[1])]) for r in regs]
net = tf.concat(3, [net]+regularizers)
net = conv2d(net, net.get_shape()[3], name="d_endd3", k_w=1, k_h=1, d_h=1, d_w=1, stddev=0.3)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
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: tensorly/tensorly
Commit Name: 3dba9054b3c7bf4b9edabb430eb457a07e05b6ca
Time: 2018-07-05
Author: jean.kossaifi@gmail.com
File Name: tensorly/mps_tensor.py
Class Name:
Method Name: mps_to_tensor
Project Name: bethgelab/foolbox
Commit Name: b939c910d036d8197ac7c63e5f188bc4c4fc4803
Time: 2019-07-20
Author: rzrolandzimmermann@gmail.com
File Name: foolbox/batching.py
Class Name:
Method Name: run_parallel