Преглед изворни кода

update eager api notebooks

aymericdamien пре 7 година
родитељ
комит
9a0aa4493a

+ 3 - 3
notebooks/1_Introduction/basic_eager_api.ipynb

@@ -42,8 +42,7 @@
     "from __future__ import absolute_import, division, print_function\n",
     "\n",
     "import numpy as np\n",
-    "import tensorflow as tf\n",
-    "import tensorflow.contrib.eager as tfe"
+    "import tensorflow as tf"
    ]
   },
   {
@@ -64,7 +63,8 @@
    "source": [
     "# Set Eager API\n",
     "print(\"Setting Eager mode...\")\n",
-    "tfe.enable_eager_execution()"
+    "tf.enable_eager_execution()\n",
+    "tfe = tf.contrib.eager"
    ]
   },
   {

+ 3 - 3
notebooks/2_BasicModels/linear_regression_eager_api.ipynb

@@ -24,8 +24,7 @@
     "\n",
     "import matplotlib.pyplot as plt\n",
     "import numpy as np\n",
-    "import tensorflow as tf\n",
-    "import tensorflow.contrib.eager as tfe"
+    "import tensorflow as tf"
    ]
   },
   {
@@ -37,7 +36,8 @@
    "outputs": [],
    "source": [
     "# Set Eager API\n",
-    "tfe.enable_eager_execution()"
+    "tf.enable_eager_execution()\n",
+    "tfe = tf.contrib.eager"
    ]
   },
   {

+ 3 - 3
notebooks/2_BasicModels/logistic_regression_eager_api.ipynb

@@ -35,8 +35,7 @@
    "source": [
     "from __future__ import absolute_import, division, print_function\n",
     "\n",
-    "import tensorflow as tf\n",
-    "import tensorflow.contrib.eager as tfe"
+    "import tensorflow as tf"
    ]
   },
   {
@@ -48,7 +47,8 @@
    "outputs": [],
    "source": [
     "# Set Eager API\n",
-    "tfe.enable_eager_execution()"
+    "tf.enable_eager_execution()\n",
+    "tfe = tf.contrib.eager"
    ]
   },
   {

+ 3 - 3
notebooks/3_NeuralNetworks/neural_network_eager_api.ipynb

@@ -41,8 +41,7 @@
    "source": [
     "from __future__ import print_function\n",
     "\n",
-    "import tensorflow as tf\n",
-    "import tensorflow.contrib.eager as tfe"
+    "import tensorflow as tf"
    ]
   },
   {
@@ -54,7 +53,8 @@
    "outputs": [],
    "source": [
     "# Set Eager API\n",
-    "tfe.enable_eager_execution()"
+    "tf.enable_eager_execution()\n",
+    "tfe = tf.contrib.eager"
    ]
   },
   {