Skip to content

Commit

Permalink
towards fixing #318
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasquale Minervini committed Oct 29, 2017
1 parent 89c26d2 commit 4dc7b5e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions jack/debug/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: utf-8 -*-
23 changes: 23 additions & 0 deletions jack/debug/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-

import tensorflow as tf

import logging

logger = logging.getLogger(__name__)


def test_update(feed_dict, train_op):
session = tf.Session()
session.run(tf.global_variables_initializer())

before = session.run(tf.trainable_variables())
session.run(train_op, feed_dict=feed_dict)
after = session.run(tf.trainable_variables())

res = False
for b, a in zip(before, after):
# Check if anything changed
res |= (b != a).any()

return res

0 comments on commit 4dc7b5e

Please sign in to comment.