Skip to content

Commit

Permalink
y_train_hinge must be paired with y_train_nocon (tensorflow#211)
Browse files Browse the repository at this point in the history
* y_train_hinge must be paired with y_train_nocon

y_train_hinge should be accordance with x_train_tfcirc, which originates from x_train_nocon

* y_train_hinge must be paired with y_train_nocon

update the doc

* pin cirq==0.7

Co-authored-by: Mark Daoust <[email protected]>
  • Loading branch information
tiancheng2000 and MarkDaoust authored May 5, 2020
1 parent a78c79a commit 2294622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/mnist.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@
"\n",
"Note: Another valid approach would be to shift the output range to `[0,1]`, and treat it as the probability the model assigns to class `3`. This could be used with a standard a `tf.losses.BinaryCrossentropy` loss.\n",
"\n",
"To use the hinge loss here you need to make two small adjustments. First convert the labels, `y_train`, from boolean to `[-1,1]`, as expected by the hinge loss."
"To use the hinge loss here you need to make two small adjustments. First convert the labels, `y_train_nocon`, from boolean to `[-1,1]`, as expected by the hinge loss."
]
},
{
Expand All @@ -788,7 +788,7 @@
},
"outputs": [],
"source": [
"y_train_hinge = 2.0*y_train-1.0\n",
"y_train_hinge = 2.0*y_train_nocon-1.0\n",
"y_test_hinge = 2.0*y_test-1.0"
]
},
Expand Down

0 comments on commit 2294622

Please sign in to comment.