-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunitTesting.py
More file actions
22 lines (21 loc) · 806 Bytes
/
Copy pathunitTesting.py
File metadata and controls
22 lines (21 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Imports
import tensorflow as tf
from sklearn.datasets import make_multilabel_classification
from sklearn.model_selection import train_test_split
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.losses import binary_crossentropy
from tensorflow.keras.optimizers import Adam
def paramchange():
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()