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]
result = tf.nn.avg_pool(result, ksize=filter, strides=stride, padding="SAME")
result = batch_norm(config["batch_size"], name="d_expand_bn_end_"+str(i))(result)
result = activation(result)
After Change
print("Discriminator pyramid layer:", net)
net = tf.reshape(net, [config["batch_size"]*2, -1])
net = batch_norm(config["batch_size"]*2, name="d_expand_bn_end_"+str(i))(net)
net = activation(net)
net = linear(net, int(1024), scope="d_fc_end1")
net = batch_norm(config["batch_size"]*2, name="d_bn_end1")(net)
net = activation(net)