Update AIR tutorial following
" # Sample object pose. This is a 3-dimensional vector representing x,y position and size.\n",
" z_where = pyro.sample('z_where_{}'.format(t),\n",
" dist.normal,\n",
- " z_where_prior_mu,\n",
- " z_where_prior_sigma,\n",
- " batch_size=1)\n",
+ " z_where_prior_mu.expand(1, -1),\n",
+ " z_where_prior_sigma.expand(1, -1))\n",
"\n",
" # Sample object code. This is a 50-dimensional vector.\n",
" z_what = pyro.sample('z_what_{}'.format(t),\n",
" dist.normal,\n",
- " z_what_prior_mu,\n",
- " z_what_prior_sigma,\n",
- " batch_size=1)\n",
+ " z_what_prior_mu.expand(1, -1),\n",
+ " z_what_prior_sigma.expand(1, -1))\n",
" \n",
" # Map code to pixel space using the neural network.\n",
" y_att = decode(z_what)\n",
"\n",
" z_where = pyro.sample('z_where_{}'.format(t),\n",
" dist.normal,\n",
- " z_where_prior_mu,\n",
- " z_where_prior_sigma,\n",
- " batch_size=n,\n",
+ " z_where_prior_mu.expand(n, -1),\n",
+ " z_where_prior_sigma.expand(n, -1),\n",
" log_pdf_mask=z_pres)\n",
"\n",
" z_what = pyro.sample('z_what_{}'.format(t),\n",
" dist.normal,\n",
- " z_what_prior_mu,\n",
- " z_what_prior_sigma,\n",
- " batch_size=n,\n",
+ " z_what_prior_mu.expand(n, -1),\n",
+ " z_what_prior_sigma.expand(n, -1),\n",
" log_pdf_mask=z_pres)\n",
"\n",
" y_att = decode(z_what)\n",
