Skip to content

Commit

Permalink
Fix oob index in sparse example
Browse files Browse the repository at this point in the history
A sparse matrix with shape [4, 10] is being assigned an element at location [7, 0]. This changes that to the valid [3, 0].
  • Loading branch information
ericcanton authored Nov 27, 2023
1 parent ec76585 commit f1f01a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/en/guide/sparse_tensor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
" values=[31, 2], \n",
" dense_shape=[4, 10])\n",
"\n",
"st_b = tf.sparse.SparseTensor(indices=[[0, 2], [7, 0]],\n",
"st_b = tf.sparse.SparseTensor(indices=[[0, 2], [3, 0]],\n",
" values=[56, 38],\n",
" dense_shape=[4, 10])\n",
"\n",
Expand Down

0 comments on commit f1f01a1

Please sign in to comment.