Skip to content

Instantly share code, notes, and snippets.

@chaserileyroberts
Last active December 3, 2019 08:56
Show Gist options
  • Save chaserileyroberts/30fe8c69f6432e5246395de419d78f8d to your computer and use it in GitHub Desktop.
Save chaserileyroberts/30fe8c69f6432e5246395de419d78f8d to your computer and use it in GitHub Desktop.
def test_convnet():
image = tf.placeholder(tf.float32, (None, 100, 100, 3)
model = Model(image)
sess = tf.Session()
sess.run(tf.global_variables_initializer())
before = sess.run(tf.trainable_variables())
_ = sess.run(model.train, feed_dict={
image: np.ones((1, 100, 100, 3)),
})
after = sess.run(tf.trainable_variables())
for b, a, n in zip(before, after):
# Make sure something changed.
assert (b != a).any()
@FabianGroeger96
Copy link

Line 11 should be changed to:
for b, a in zip(before, after):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment