Skip to content

Commit 4dc7b5e

Browse files
author
Pasquale Minervini
committed
towards fixing #318
1 parent 89c26d2 commit 4dc7b5e

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

jack/debug/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# -*- coding: utf-8 -*-

jack/debug/base.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import tensorflow as tf
4+
5+
import logging
6+
7+
logger = logging.getLogger(__name__)
8+
9+
10+
def test_update(feed_dict, train_op):
11+
session = tf.Session()
12+
session.run(tf.global_variables_initializer())
13+
14+
before = session.run(tf.trainable_variables())
15+
session.run(train_op, feed_dict=feed_dict)
16+
after = session.run(tf.trainable_variables())
17+
18+
res = False
19+
for b, a in zip(before, after):
20+
# Check if anything changed
21+
res |= (b != a).any()
22+
23+
return res

0 commit comments

Comments
 (0)