Skip to content

Instantly share code, notes, and snippets.

View train_each_example.py
import tensorflow as tf
import numpy as np
# Toy problem: minimize x^2, for four different x's
all_x = np.array([-3.,-1,1,3])
all_m = np.zeros(4)
all_v = np.zeros(4)
with tf.Graph().as_default() as g: