Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07bfd45

Browse files
committed
update image flattening to use reshape
1 parent 3a018eb commit 07bfd45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎Capsule_Network.ipynb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@
620620
" # create reconstructed pixels\n",
621621
" x = x * y[:, :, None]\n",
622622
" # flatten image into a vector shape (batch_size, vector_dim)\n",
623-
" flattened_x = x.view(x.size(0), -1)\n",
623+
" flattened_x = x.reshape(x.size(0), -1)\n",
624624
" # create reconstructed image vectors\n",
625625
" reconstructions = self.linear_layers(flattened_x)\n",
626626
" \n",
@@ -1496,7 +1496,7 @@
14961496
],
14971497
"metadata": {
14981498
"kernelspec": {
1499-
"display_name": "Python [default]",
1499+
"display_name": "Python 3",
15001500
"language": "python",
15011501
"name": "python3"
15021502
},
@@ -1510,7 +1510,7 @@
15101510
"name": "python",
15111511
"nbconvert_exporter": "python",
15121512
"pygments_lexer": "ipython3",
1513-
"version": "3.6.4"
1513+
"version": "3.6.10"
15141514
}
15151515
},
15161516
"nbformat": 4,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /