It takes so much time to define an Adam optimizer in TensorFlow
It takes so much time to define an Adam optimizer in TensorFlow I use Adam optimizer to train a network, but I don't know why it takes so much time to just define the trainer. In TensorFlow, what does Adam optimizer do when we define it? Here is how I define the trainer. mse_loss = tf.reduce_sum(tf.squared_difference(generated_images, FD_placeholder)) / (batch_size * width * height) print(gen_variables) print(mse_loss) g_trainer = tf.train.AdamOptimizer(learning_rate=lr) print("aaaaa") g_trainer = g_trainer.minimize(mse_loss, var_list=gen_variables) print("aaaaa") lr is a placeholder for learning rate, it has type tf.float32, and shape=[ ]. generated_images and FD_placeholder have a shape (batch_size,64,64,1). I use batch_size = 2. width and height are equal to 64 gen_variables has shape (91,1,1) and dtype=tf.float32. Here is the output for these few lines of code. [<tf.Variable 'generator_model/g_w1:0' shape=(91, 1, 1) dtype=float32_ref>] Tensor(...
