diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2016-12-14 23:45:28 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-12-15 00:04:59 -0800 |
commit | c5dc750ba9fab7e7f1f05ee0e0cdb04ae96e0e32 (patch) | |
tree | 937edf17553f8d1f24abaf683dc83b10e7e730f4 /tensorflow/contrib/integrate | |
parent | 3bb102941e638617894facca6859b444154f8c2b (diff) |
Switch array_ops.pack/unpack to array_ops.stack/unstack. Also switch a few remaining references to tf.pack/unpack to tf.stack/unstack.
Change: 142108785
Diffstat (limited to 'tensorflow/contrib/integrate')
-rw-r--r-- | tensorflow/contrib/integrate/__init__.py | 4 | ||||
-rw-r--r-- | tensorflow/contrib/integrate/python/ops/odes_test.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/contrib/integrate/__init__.py b/tensorflow/contrib/integrate/__init__.py index e88d10c582..953dc6c55a 100644 --- a/tensorflow/contrib/integrate/__init__.py +++ b/tensorflow/contrib/integrate/__init__.py @@ -27,11 +27,11 @@ sigma = 10.0 beta = 8.0/3.0 def lorenz_equation(state, t): - x, y, z = tf.unpack(state) + x, y, z = tf.unstack(state) dx = sigma * (y - x) dy = x * (rho - z) - y dz = x * y - beta * z - return tf.pack([dx, dy, dz]) + return tf.stack([dx, dy, dz]) init_state = tf.constant([0, 2, 20], dtype=tf.float64) t = np.linspace(0, 50, num=5000) diff --git a/tensorflow/contrib/integrate/python/ops/odes_test.py b/tensorflow/contrib/integrate/python/ops/odes_test.py index cb036bf05a..55d92fe9cf 100644 --- a/tensorflow/contrib/integrate/python/ops/odes_test.py +++ b/tensorflow/contrib/integrate/python/ops/odes_test.py @@ -214,8 +214,8 @@ class InterpolationTest(tf.test.TestCase): coeffs = odes._interp_fit( f(0.0), f(10.0), f(5.0), f_prime(0.0), f_prime(10.0), 10.0) times = np.linspace(0, 10, dtype=np.float32) - y_fit = tf.pack([odes._interp_evaluate(coeffs, 0.0, 10.0, t) - for t in times]) + y_fit = tf.stack( + [odes._interp_evaluate(coeffs, 0.0, 10.0, t) for t in times]) y_expected = f(times) with self.test_session() as sess: y_actual = sess.run(y_fit) |