<commit_before>import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf

from PIL import Image

batch_size = 128
epochs = 30
input_dim = 784
iteration = 100000
learning_rate = 0.0001
noise_dim = 100
 
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data() 
x_train = x_train.reshape([x_train.shape[0], -1]).astype('float32') / 255 
 
# input placeholders
X = tf.placeholder(tf.float32, [None, input_dim])
Z = tf.placeholder(tf.float32, [None, noise_dim])

# variable & model
with tf.variable_scope('generator'):
    W1 = tf.get_variable(name="W1", shape=[noise_dim, 512], initializer=tf.keras.initializers.he_normal())
    b1 = tf.get_variable(name="b1", shape=[512], initializer=tf.zeros_initializer())
    W2 = tf.get_variable(name="W2", shape=[512, input_dim], initializer=tf.glorot_uniform_initializer())
    b2 = tf.get_variable(name="b2", shape=[input_dim], initializer=tf.zeros_initializer())

with tf.variable_scope('discriminator'):<commit_msg>Update Tensorflow.py<commit_after>import numpy as np
import tensorflow as tf

from PIL import Image

batch_size = 128
epochs = 30
input_dim = 784
iteration = 100000
learning_rate = 0.0001
noise_dim = 100
 
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data() 
x_train = x_train.reshape([x_train.shape[0], -1]).astype('float32') / 255 
 
# input placeholders
X = tf.placeholder(tf.float32, [None, input_dim])
Z = tf.placeholder(tf.float32, [None, noise_dim])

# variable & model
with tf.variable_scope('generator'):
    W1 = tf.get_variable(name="W1", shape=[noise_dim, 512], initializer=tf.keras.initializers.he_normal())
    b1 = tf.get_variable(name="b1", shape=[512], initializer=tf.zeros_initializer())
    W2 = tf.get_variable(name="W2", shape=[512, input_dim], initializer=tf.glorot_uniform_initializer())
    b2 = tf.get_variable(name="b2", shape=[input_dim], initializer=tf.zeros_initializer())

with tf.variable_scope('discriminator'):
{'fraction_non_alphanumeric': 0.14614205416453754, 'fraction_numerical': 0.05109862033725089, 'mean_word_length': 5.992857142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '924489', 'n_tokens_mistral': 781, 'n_tokens_neox': 707, 'n_words': 138}