Skip to content

Commit b5a7247

Browse files
MarkDaoustcopybara-github
authored andcommitted
Remove %tensorflow_version and from __future__
PiperOrigin-RevId: 308827254
1 parent 897f03d commit b5a7247

File tree

6 files changed

+31
-82
lines changed

6 files changed

+31
-82
lines changed

tensorflow_graphics/g3doc/_index.ipynb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@
9999
},
100100
"outputs": [],
101101
"source": [
102-
"from __future__ import absolute_import\n",
103-
"from __future__ import division\n",
104-
"from __future__ import print_function\n",
105-
"\n",
106102
"import numpy as np\n",
107103
"import tensorflow as tf\n",
108104
"import trimesh\n",

tensorflow_graphics/notebooks/6dof_alignment.ipynb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@
117117
},
118118
"outputs": [],
119119
"source": [
120-
"from __future__ import absolute_import\n",
121-
"from __future__ import division\n",
122-
"from __future__ import print_function\n",
123-
"\n",
124120
"import time\n",
125121
"\n",
126122
"import matplotlib.pyplot as plt\n",
@@ -670,15 +666,10 @@
670666
"metadata": {
671667
"colab": {
672668
"collapsed_sections": [],
673-
"last_runtime": {
674-
"build_target": "//learning/brain/python/client:colab_notebook",
675-
"kind": "private"
676-
},
677669
"name": "6dof alignment.ipynb",
678670
"private_outputs": true,
679671
"provenance": [],
680-
"toc_visible": true,
681-
"version": "0.3.2"
672+
"toc_visible": true
682673
},
683674
"kernelspec": {
684675
"display_name": "Python 3",

tensorflow_graphics/notebooks/intrinsics_optimization.ipynb

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,6 @@
116116
},
117117
"outputs": [],
118118
"source": [
119-
"from __future__ import absolute_import\n",
120-
"from __future__ import division\n",
121-
"from __future__ import print_function\n",
122-
"\n",
123119
"import tensorflow as tf\n",
124120
"import matplotlib.pyplot as plt\n",
125121
"import numpy as np\n",
@@ -129,9 +125,7 @@
129125
"#################################\n",
130126
"\n",
131127
"from tensorflow_graphics.math.optimizer import levenberg_marquardt\n",
132-
"from tensorflow_graphics.rendering.camera import perspective \n",
133-
"\n",
134-
"tf.compat.v1.enable_eager_execution()"
128+
"from tensorflow_graphics.rendering.camera import perspective "
135129
]
136130
},
137131
{
@@ -434,14 +428,10 @@
434428
"metadata": {
435429
"colab": {
436430
"collapsed_sections": [],
437-
"last_runtime": {
438-
"build_target": "//learning/brain/python/client:colab_notebook",
439-
"kind": "private"
440-
},
441431
"name": "intrinsics_optimization.ipynb",
442432
"provenance": [],
443433
"toc_visible": true,
444-
"version": "0.3.2"
434+
"private_outputs": true
445435
},
446436
"kernelspec": {
447437
"display_name": "Python 3",

tensorflow_graphics/notebooks/mesh_segmentation_demo.ipynb

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
{
2-
"nbformat": 4,
3-
"nbformat_minor": 0,
4-
"metadata": {
5-
"colab": {
6-
"name": "mesh_segmentation_demo.ipynb",
7-
"provenance": [],
8-
"private_outputs": true,
9-
"collapsed_sections": [],
10-
"toc_visible": true
11-
},
12-
"kernelspec": {
13-
"name": "python3",
14-
"display_name": "Python 3"
15-
}
16-
},
2+
173
"cells": [
184
{
195
"cell_type": "markdown",
@@ -165,13 +151,10 @@
165151
"colab": {}
166152
},
167153
"source": [
168-
"from __future__ import absolute_import\n",
169-
"from __future__ import division\n",
170-
"from __future__ import print_function\n",
171-
"\n",
172154
"import glob\n",
173155
"import os\n",
174-
"import tensorflow as tf\n",
156+
"import tensorflow.compat.v1 as tf\n",
157+
"tf.disable_v2_behavior()\n",
175158
"\n",
176159
"from tensorflow_graphics.nn.layer import graph_convolution as graph_conv\n",
177160
"from tensorflow_graphics.notebooks import mesh_segmentation_dataio as dataio\n",
@@ -661,9 +644,22 @@
661644
"print('Start training & eval.')\n",
662645
"tf.estimator.train_and_evaluate(classifier, train_spec, eval_spec)\n",
663646
"print('Train and eval done.')"
664-
],
665-
"execution_count": 0,
666-
"outputs": []
647+
]
648+
}
649+
],
650+
"metadata": {
651+
"colab": {
652+
"collapsed_sections": [],
653+
"name": "mesh_segmentation_demo.ipynb",
654+
"private_outputs": true,
655+
"provenance": [],
656+
"toc_visible": true
657+
},
658+
"kernelspec": {
659+
"display_name": "Python 3",
660+
"name": "python3"
667661
}
668-
]
669-
}
662+
},
663+
"nbformat": 4,
664+
"nbformat_minor": 0
665+
}

tensorflow_graphics/notebooks/non_rigid_deformation.ipynb

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"id": "cDgpEHaUETGA"
88
},
99
"source": [
10-
"##### Copyright 2019 Google LLC.\n",
11-
"\n"
10+
"##### Copyright 2019 Google LLC.\n"
1211
]
1312
},
1413
{
@@ -112,10 +111,6 @@
112111
},
113112
"outputs": [],
114113
"source": [
115-
"from __future__ import absolute_import\n",
116-
"from __future__ import division\n",
117-
"from __future__ import print_function\n",
118-
"\n",
119114
"import numpy as np\n",
120115
"import tensorflow as tf\n",
121116
"\n",
@@ -124,9 +119,7 @@
124119
"from tensorflow_graphics.geometry.transformation import quaternion\n",
125120
"from tensorflow_graphics.math.optimizer import levenberg_marquardt\n",
126121
"from tensorflow_graphics.notebooks import threejs_visualization\n",
127-
"from tensorflow_graphics.notebooks.resources import triangulated_stripe\n",
128-
"\n",
129-
"tf.compat.v1.enable_eager_execution()"
122+
"from tensorflow_graphics.notebooks.resources import triangulated_stripe"
130123
]
131124
},
132125
{
@@ -271,14 +264,10 @@
271264
"metadata": {
272265
"colab": {
273266
"collapsed_sections": [],
274-
"last_runtime": {
275-
"build_target": "//learning/brain/python/client:colab_notebook",
276-
"kind": "private"
277-
},
278-
"name": "non_rigid_deformation_demo.ipynb",
267+
"name": "non_rigid_deformation.ipynb",
279268
"provenance": [],
280269
"toc_visible": true,
281-
"version": "0.3.2"
270+
"private_outputs": true
282271
},
283272
"kernelspec": {
284273
"display_name": "Python 3",

tensorflow_graphics/notebooks/reflectance.ipynb

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,6 @@
114114
},
115115
"outputs": [],
116116
"source": [
117-
"###########\n",
118-
"# Imports #\n",
119-
"###########\n",
120-
"from __future__ import absolute_import\n",
121-
"from __future__ import division\n",
122-
"from __future__ import print_function\n",
123-
"\n",
124117
"import math as m\n",
125118
"import matplotlib.pyplot as plt\n",
126119
"import numpy as np\n",
@@ -131,9 +124,7 @@
131124
"from tensorflow_graphics.rendering.camera import orthographic\n",
132125
"from tensorflow_graphics.geometry.representation import grid\n",
133126
"from tensorflow_graphics.geometry.representation import ray\n",
134-
"from tensorflow_graphics.geometry.representation import vector\n",
135-
"\n",
136-
"tf.compat.v1.enable_eager_execution()"
127+
"from tensorflow_graphics.geometry.representation import vector"
137128
]
138129
},
139130
{
@@ -296,14 +287,10 @@
296287
"metadata": {
297288
"colab": {
298289
"collapsed_sections": [],
299-
"last_runtime": {
300-
"build_target": "//learning/brain/python/client:colab_notebook",
301-
"kind": "private"
302-
},
303-
"name": "reflectance_demo.ipynb",
290+
"name": "reflectance.ipynb",
304291
"provenance": [],
305292
"toc_visible": true,
306-
"version": "0.3.2"
293+
"private_outputs": true
307294
},
308295
"kernelspec": {
309296
"display_name": "Python 3",

0 commit comments

Comments
 (0)