Thank you for sharing your code. It actually helped me a lot!
for ddx = tf.sqrt(tf.reduce_sum(tf.square(ddx), axis=1))
you can actually use ddx = tf.norm(ddx, axis=1), I tried this it's actually the same result
for the Discriminator in mlp, I use tf.layers, that saves a lot of lines of code. As below.
Thank you for sharing your code. It actually helped me a lot!
for ddx = tf.sqrt(tf.reduce_sum(tf.square(ddx), axis=1)) you can actually use ddx = tf.norm(ddx, axis=1), I tried this it's actually the same result for the Discriminator in mlp, I use tf.layers, that saves a lot of lines of code. As below.