Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Chapter1_Introduction/Ch1_Introduction_TFP.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -1273,11 +1273,11 @@
" target_log_prob_fn=unnormalized_log_posterior,\n",
" num_leapfrog_steps=2,\n",
" step_size=step_size,\n",
" step_size_update_fn=tfp.mcmc.make_simple_step_size_update_policy(),\n",
" step_size_update_fn=tfp.mcmc.make_simple_step_size_update_policy(None),\n",
" 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",
Expand Down