Skip to content

Commit 57912d2

Browse files
MarkDaousttensorflow-copybara
authored andcommitted
Remove %tensorflow_version and from __future__
PiperOrigin-RevId: 305914189
1 parent 0dac208 commit 57912d2

File tree

3 files changed

+5
-86
lines changed

3 files changed

+5
-86
lines changed

g3doc/tutorials/adversarial_keras_cnn_mnist.ipynb

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -108,34 +108,6 @@
108108
"## Setup"
109109
]
110110
},
111-
{
112-
"cell_type": "markdown",
113-
"metadata": {
114-
"colab_type": "text",
115-
"id": "m58k8nv3YVdf"
116-
},
117-
"source": [
118-
"Select TensorFlow 2.x to create an interactive development environment with\n",
119-
"eager execution."
120-
]
121-
},
122-
{
123-
"cell_type": "code",
124-
"execution_count": 0,
125-
"metadata": {
126-
"colab": {},
127-
"colab_type": "code",
128-
"id": "rYz0BCS_YSD_"
129-
},
130-
"outputs": [],
131-
"source": [
132-
"try:\n",
133-
" # %tensorflow_version only exists in Colab.\n",
134-
" %tensorflow_version 2.x\n",
135-
"except Exception:\n",
136-
" !pip install --quiet tensorflow-gpu>=2.0.0"
137-
]
138-
},
139111
{
140112
"cell_type": "markdown",
141113
"metadata": {
@@ -179,8 +151,6 @@
179151
},
180152
"outputs": [],
181153
"source": [
182-
"from __future__ import absolute_import, division, print_function, unicode_literals\n",
183-
"\n",
184154
"import matplotlib.pyplot as plt\n",
185155
"import neural_structured_learning as nsl\n",
186156
"import numpy as np\n",
@@ -796,18 +766,9 @@
796766
"accelerator": "GPU",
797767
"colab": {
798768
"collapsed_sections": [],
799-
"last_runtime": {
800-
"build_target": "",
801-
"kind": ""
802-
},
803769
"name": "Adversarial regularization for image classification",
804770
"private_outputs": true,
805-
"provenance": [
806-
{
807-
"file_id": "1OzN5O8RmJpBgsUxHDw4maWm9wPM1Zx0Y",
808-
"timestamp": 1566174674305
809-
}
810-
],
771+
"provenance": [],
811772
"toc_visible": true
812773
},
813774
"kernelspec": {

g3doc/tutorials/graph_keras_lstm_imdb.ipynb

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"cell_type": "code",
1515
"execution_count": 0,
1616
"metadata": {
17-
"cellView": "both",
17+
"cellView": "form",
1818
"colab": {},
1919
"colab_type": "code",
2020
"id": "ioaprt5q5US7"
@@ -166,11 +166,6 @@
166166
},
167167
"outputs": [],
168168
"source": [
169-
"from __future__ import absolute_import\n",
170-
"from __future__ import division\n",
171-
"from __future__ import print_function\n",
172-
"from __future__ import unicode_literals\n",
173-
"\n",
174169
"import matplotlib.pyplot as plt\n",
175170
"import numpy as np\n",
176171
"\n",
@@ -1554,18 +1549,9 @@
15541549
"collapsed_sections": [
15551550
"24gYiJcWNlpA"
15561551
],
1557-
"last_runtime": {
1558-
"build_target": "",
1559-
"kind": ""
1560-
},
15611552
"name": "Graph regularization for sentiment classification using synthesized graphs",
15621553
"private_outputs": true,
1563-
"provenance": [
1564-
{
1565-
"file_id": "1oxGg3-S0zkLmp-yvhaW6KHZTUZcKtp1N",
1566-
"timestamp": 1566436775546
1567-
}
1568-
],
1554+
"provenance": [],
15691555
"toc_visible": true
15701556
},
15711557
"kernelspec": {

g3doc/tutorials/graph_keras_mlp_cora.ipynb

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@
105105
"id": "nDOFbB34KY1R"
106106
},
107107
"source": [
108-
"## Setup\n",
109-
"\n"
108+
"## Setup\n"
110109
]
111110
},
112111
{
@@ -166,8 +165,6 @@
166165
},
167166
"outputs": [],
168167
"source": [
169-
"from __future__ import absolute_import, division, print_function, unicode_literals\n",
170-
"\n",
171168
"import neural_structured_learning as nsl\n",
172169
"\n",
173170
"import tensorflow as tf\n",
@@ -941,34 +938,9 @@
941938
"accelerator": "GPU",
942939
"colab": {
943940
"collapsed_sections": [],
944-
"last_runtime": {
945-
"build_target": "",
946-
"kind": ""
947-
},
948941
"name": "Graph regularization for document classification using natural graphs",
949942
"private_outputs": true,
950-
"provenance": [
951-
{
952-
"file_id": "1fU5KNlUkcmoJpcRS3drN_fqqPTNIxKYA",
953-
"timestamp": 1565209501661
954-
},
955-
{
956-
"file_id": "121ebCFnOS1ws5xRtXaucczmmNyQ8V74M",
957-
"timestamp": 1564612864724
958-
},
959-
{
960-
"file_id": "1UmcOsEBH2cj9j6UR6tezMXd4xeP7CI9L",
961-
"timestamp": 1561165409691
962-
},
963-
{
964-
"file_id": "15-Zu5wXc3Pui03hhQQXaNZ592iRkVehT",
965-
"timestamp": 1561165010534
966-
},
967-
{
968-
"file_id": "1I32Mr7GQrPmK8GODTxgcqZNSjQpZMWIk",
969-
"timestamp": 1560299386497
970-
}
971-
],
943+
"provenance": [],
972944
"toc_visible": true
973945
},
974946
"kernelspec": {

0 commit comments

Comments
 (0)