Commit f2427a6
Move TF1 hashing example out of code cell.
A planned change in TensorFlow will disable hashing
of tensors in eager execution mode even when
numpy-style equality is disabled
(the TensorFlow 1 default).
This will break the moved example. Since we cannot
disable and re-enable eager execution after the
beginning of the program, this example is no longer
runnable under TF2 - even with the compatibility
layer.
As noted in the edited documentation, `set` requires
its elements to be hashable - since this example runs
under TF2 and we will no longer allow hashing of tensors
in eager execution mode full-stop, the code _is_ valid
TF1 code but cannot be run with the proposed changes to TF2.
PiperOrigin-RevId: 5201008231 parent 9159cb6 commit f2427a6
1 file changed
Lines changed: 5 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1027 | 1027 | | |
1028 | 1028 | | |
1029 | 1029 | | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
| 1030 | + | |
| 1031 | + | |
1042 | 1032 | | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
1052 | 1036 | | |
1053 | 1037 | | |
1054 | 1038 | | |
| |||
0 commit comments