From baacecc2fbc2c3efea79b2138eb3e07b26d0a833 Mon Sep 17 00:00:00 2001 From: d84-n1nj4 Date: Sun, 25 Aug 2019 20:39:56 -0400 Subject: [PATCH] Fix Typo in Code Fixed Line 1280, the parenthesis was in the incorrect location. Fixed line 1211, no need for the tf.float32 at the end. --- Chapter1_Introduction/Ch1_Introduction_TFP.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Chapter1_Introduction/Ch1_Introduction_TFP.ipynb b/Chapter1_Introduction/Ch1_Introduction_TFP.ipynb index 07aede9a..3bae5264 100644 --- a/Chapter1_Introduction/Ch1_Introduction_TFP.ipynb +++ b/Chapter1_Introduction/Ch1_Introduction_TFP.ipynb @@ -1208,7 +1208,7 @@ "# Set the chain's start state.\n", "initial_chain_state = [\n", " tf.cast(tf.reduce_mean(count_data), tf.float32) * tf.ones([], dtype=tf.float32, name=\"init_lambda1\"),\n", - " tf.cast(tf.reduce_mean(count_data), tf.float32) * tf.ones([], dtype=tf.float32, name=\"init_lambda2\", tf.float32),\n", + " tf.cast(tf.reduce_mean(count_data), tf.float32) * tf.ones([], dtype=tf.float32, name=\"init_lambda2\"),\n", " 0.5 * tf.ones([], dtype=tf.float32, name=\"init_tau\"),\n", "]\n", "\n", @@ -1277,7 +1277,7 @@ " state_gradients_are_stopped=True),\n", " bijector=unconstraining_bijectors))\n", "\n", - "tau_samples = tf.floor(posterior_tau * tf.cast(tf.size(count_data)), tf.float32)\n", + "tau_samples = tf.floor(posterior_tau * tf.cast(tf.size(count_data), tf.float32))\n", "\n", "# tau_samples, lambda_1_samples, lambda_2_samples contain\n", "# N samples from the corresponding posterior distribution\n",