Skip to content

Commit

Permalink
Merge pull request fastai#136 from appleby/lesson6-expand-dims
Browse files Browse the repository at this point in the history
Use np.squeeze and np.atleast_3d to munge dimensions for {x,y}_rnn
  • Loading branch information
jph00 authored Aug 2, 2017
2 parents b8f6645 + 9ab8276 commit 9179eb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deeplearning1/nbs/lesson6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2171,8 +2171,8 @@
},
"outputs": [],
"source": [
"x_rnn=np.stack(xs, axis=1)\n",
"y_rnn=np.expand_dims(np.stack(ys, axis=1), -1)"
"x_rnn=np.stack(np.squeeze(xs), axis=1)\n",
"y_rnn=np.atleast_3d(np.stack(ys, axis=1))"
]
},
{
Expand Down

0 comments on commit 9179eb4

Please sign in to comment.