|
53 | 53 | "source": [ |
54 | 54 | "\u003ctable class=\"tfo-notebook-buttons\" align=\"left\"\u003e\n", |
55 | 55 | " \u003ctd\u003e\n", |
56 | | - " \u003ca target=\"_blank\" href=\"https://www.tensorflow.org/neural_structured_learning/tutorials/graph_keras_mlp_cora.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" /\u003eView on TensorFlow.org\u003c/a\u003e\n", |
| 56 | + " \u003ca target=\"_blank\" href=\"https://www.tensorflow.org/neural_structured_learning/tutorials/graph_keras_mlp_cora\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" /\u003eView on TensorFlow.org\u003c/a\u003e\n", |
57 | 57 | " \u003c/td\u003e\n", |
58 | 58 | " \u003ctd\u003e\n", |
59 | 59 | " \u003ca target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/neural-structured-learning/blob/master/g3doc/tutorials/graph_keras_mlp_cora.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" /\u003eRun in Google Colab\u003c/a\u003e\n", |
|
106 | 106 | }, |
107 | 107 | "source": [ |
108 | 108 | "## Setup\n", |
109 | | - "\n", |
| 109 | + "\n" |
| 110 | + ] |
| 111 | + }, |
| 112 | + { |
| 113 | + "cell_type": "markdown", |
| 114 | + "metadata": { |
| 115 | + "colab_type": "text", |
| 116 | + "id": "v_39VWm4yIgt" |
| 117 | + }, |
| 118 | + "source": [ |
| 119 | + "Install Tensorflow 2.0 to create an interactive developing environment with\n", |
| 120 | + "eager execution." |
| 121 | + ] |
| 122 | + }, |
| 123 | + { |
| 124 | + "cell_type": "code", |
| 125 | + "execution_count": 0, |
| 126 | + "metadata": { |
| 127 | + "colab": {}, |
| 128 | + "colab_type": "code", |
| 129 | + "id": "2m7Sp74HyFVS" |
| 130 | + }, |
| 131 | + "outputs": [], |
| 132 | + "source": [ |
| 133 | + "!pip install --quiet tensorflow==2.0.0-rc0" |
| 134 | + ] |
| 135 | + }, |
| 136 | + { |
| 137 | + "cell_type": "markdown", |
| 138 | + "metadata": { |
| 139 | + "colab_type": "text", |
| 140 | + "id": "hgSLDi0SyBuO" |
| 141 | + }, |
| 142 | + "source": [ |
110 | 143 | "Install the Neural Structured Learning package." |
111 | 144 | ] |
112 | 145 | }, |
|
147 | 180 | "\n", |
148 | 181 | "import neural_structured_learning as nsl\n", |
149 | 182 | "\n", |
150 | | - "# Enable TensorFlow v2 behavior\n", |
151 | 183 | "import tensorflow as tf\n", |
152 | | - "tf.compat.v1.enable_v2_behavior()\n", |
153 | 184 | "\n", |
154 | 185 | "# Resets notebook state\n", |
155 | 186 | "tf.keras.backend.clear_session()" |
|
244 | 275 | }, |
245 | 276 | "outputs": [], |
246 | 277 | "source": [ |
247 | | - "!wget https://github.com/tensorflow/neural-structured-learning/blob/master/examples/preprocess/cora/preprocess_cora_dataset.py\n", |
| 278 | + "!wget https://raw.githubusercontent.com/tensorflow/neural-structured-learning/master/neural_structured_learning/examples/preprocess/cora/preprocess_cora_dataset.py\n", |
248 | 279 | "\n", |
249 | 280 | "!python preprocess_cora_dataset.py \\\n", |
250 | 281 | "--input_cora_content=/tmp/cora/cora.content \\\n", |
|
0 commit comments