|
11 | 11 | "cell_type": "code",
|
12 | 12 | "execution_count": 1,
|
13 | 13 | "metadata": {},
|
14 |
| - "outputs": [], |
| 14 | + "outputs": [ |
| 15 | + { |
| 16 | + "name": "stdout", |
| 17 | + "output_type": "stream", |
| 18 | + "text": [ |
| 19 | + "Collecting tensorflow==1.14.0\n", |
| 20 | + " Using cached tensorflow-1.14.0-cp36-cp36m-win_amd64.whl (68.3 MB)\n", |
| 21 | + "Collecting keras-preprocessing>=1.0.5\n", |
| 22 | + " Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)\n", |
| 23 | + "Requirement already satisfied: wheel>=0.26 in c:\\users\\kumar apurv\\anaconda3\\envs\\ch3\\lib\\site-packages (from tensorflow==1.14.0) (0.36.2)\n", |
| 24 | + "Collecting google-pasta>=0.1.6\n", |
| 25 | + " Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)\n", |
| 26 | + "Collecting gast>=0.2.0\n", |
| 27 | + " Using cached gast-0.5.0-py3-none-any.whl (10 kB)\n", |
| 28 | + "Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0\n", |
| 29 | + " Using cached tensorflow_estimator-1.14.0-py2.py3-none-any.whl (488 kB)\n", |
| 30 | + "Collecting keras-applications>=1.0.6\n", |
| 31 | + " Using cached Keras_Applications-1.0.8-py3-none-any.whl (50 kB)\n", |
| 32 | + "Collecting grpcio>=1.8.6\n", |
| 33 | + " Using cached grpcio-1.39.0-cp36-cp36m-win_amd64.whl (3.2 MB)\n", |
| 34 | + "Collecting tensorboard<1.15.0,>=1.14.0\n", |
| 35 | + " Using cached tensorboard-1.14.0-py3-none-any.whl (3.1 MB)\n", |
| 36 | + "Collecting numpy<2.0,>=1.14.5\n", |
| 37 | + " Using cached numpy-1.19.5-cp36-cp36m-win_amd64.whl (13.2 MB)\n", |
| 38 | + "Collecting termcolor>=1.1.0\n", |
| 39 | + " Using cached termcolor-1.1.0-py3-none-any.whl\n", |
| 40 | + "Collecting wrapt>=1.11.1\n", |
| 41 | + " Using cached wrapt-1.12.1-cp36-cp36m-win_amd64.whl\n", |
| 42 | + "Requirement already satisfied: six>=1.10.0 in c:\\users\\kumar apurv\\anaconda3\\envs\\ch3\\lib\\site-packages (from tensorflow==1.14.0) (1.16.0)\n", |
| 43 | + "Collecting absl-py>=0.7.0\n", |
| 44 | + " Using cached absl_py-0.13.0-py3-none-any.whl (132 kB)\n", |
| 45 | + "Collecting protobuf>=3.6.1\n", |
| 46 | + " Using cached protobuf-3.17.3-cp36-cp36m-win_amd64.whl (910 kB)\n", |
| 47 | + "Collecting astor>=0.6.0\n", |
| 48 | + " Using cached astor-0.8.1-py2.py3-none-any.whl (27 kB)\n", |
| 49 | + "Collecting h5py\n", |
| 50 | + " Using cached h5py-3.1.0-cp36-cp36m-win_amd64.whl (2.7 MB)\n", |
| 51 | + "Collecting markdown>=2.6.8\n", |
| 52 | + " Using cached Markdown-3.3.4-py3-none-any.whl (97 kB)\n", |
| 53 | + "Requirement already satisfied: setuptools>=41.0.0 in c:\\users\\kumar apurv\\anaconda3\\envs\\ch3\\lib\\site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0) (52.0.0.post20210125)\n", |
| 54 | + "Collecting werkzeug>=0.11.15\n", |
| 55 | + " Using cached Werkzeug-2.0.1-py3-none-any.whl (288 kB)\n", |
| 56 | + "Requirement already satisfied: importlib-metadata in c:\\users\\kumar apurv\\anaconda3\\envs\\ch3\\lib\\site-packages (from markdown>=2.6.8->tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0) (4.6.1)\n", |
| 57 | + "Collecting dataclasses\n", |
| 58 | + " Using cached dataclasses-0.8-py3-none-any.whl (19 kB)\n", |
| 59 | + "Collecting cached-property\n", |
| 60 | + " Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)\n", |
| 61 | + "Requirement already satisfied: typing-extensions>=3.6.4 in c:\\users\\kumar apurv\\anaconda3\\envs\\ch3\\lib\\site-packages (from importlib-metadata->markdown>=2.6.8->tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0) (3.10.0.0)\n", |
| 62 | + "Requirement already satisfied: zipp>=0.5 in c:\\users\\kumar apurv\\anaconda3\\envs\\ch3\\lib\\site-packages (from importlib-metadata->markdown>=2.6.8->tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0) (3.5.0)\n", |
| 63 | + "Installing collected packages: numpy, dataclasses, cached-property, werkzeug, protobuf, markdown, h5py, grpcio, absl-py, wrapt, termcolor, tensorflow-estimator, tensorboard, keras-preprocessing, keras-applications, google-pasta, gast, astor, tensorflow\n", |
| 64 | + "Successfully installed absl-py-0.13.0 astor-0.8.1 cached-property-1.5.2 dataclasses-0.8 gast-0.5.0 google-pasta-0.2.0 grpcio-1.39.0 h5py-3.1.0 keras-applications-1.0.8 keras-preprocessing-1.1.2 markdown-3.3.4 numpy-1.19.5 protobuf-3.17.3 tensorboard-1.14.0 tensorflow-1.14.0 tensorflow-estimator-1.14.0 termcolor-1.1.0 werkzeug-2.0.1 wrapt-1.12.1\n", |
| 65 | + "Collecting gensim==3.6.0\n", |
| 66 | + " Using cached gensim-3.6.0-cp36-cp36m-win_amd64.whl (23.6 MB)\n", |
| 67 | + "Requirement already satisfied: six>=1.5.0 in c:\\users\\kumar apurv\\anaconda3\\envs\\ch3\\lib\\site-packages (from gensim==3.6.0) (1.16.0)\n", |
| 68 | + "Collecting scipy>=0.18.1\n", |
| 69 | + " Using cached scipy-1.5.4-cp36-cp36m-win_amd64.whl (31.2 MB)\n", |
| 70 | + "Collecting smart-open>=1.2.1\n", |
| 71 | + " Using cached smart_open-5.1.0-py3-none-any.whl (57 kB)\n", |
| 72 | + "Requirement already satisfied: numpy>=1.11.3 in c:\\users\\kumar apurv\\anaconda3\\envs\\ch3\\lib\\site-packages (from gensim==3.6.0) (1.19.5)\n", |
| 73 | + "Installing collected packages: smart-open, scipy, gensim\n", |
| 74 | + "Successfully installed gensim-3.6.0 scipy-1.5.4 smart-open-5.1.0\n", |
| 75 | + "Requirement already satisfied: numpy==1.19.5 in c:\\users\\kumar apurv\\anaconda3\\envs\\ch3\\lib\\site-packages (1.19.5)\n" |
| 76 | + ] |
| 77 | + } |
| 78 | + ], |
15 | 79 | "source": [
|
16 |
| - "#installing the required libraries\n", |
17 |
| - "!pip install tensorflow==1.14.0" |
| 80 | + "# To install only the requirements of this notebook, uncomment the lines below and run this cell\n", |
| 81 | + "\n", |
| 82 | + "# ===========================\n", |
| 83 | + "\n", |
| 84 | + "!pip install tensorflow==1.14.0\n", |
| 85 | + "!pip install gensim==3.6.0\n", |
| 86 | + "!pip install numpy==1.19.5\n", |
| 87 | + "\n", |
| 88 | + "# ===========================" |
18 | 89 | ]
|
19 | 90 | },
|
20 | 91 | {
|
21 | 92 | "cell_type": "code",
|
22 | 93 | "execution_count": 2,
|
23 | 94 | "metadata": {},
|
24 | 95 | "outputs": [],
|
| 96 | + "source": [ |
| 97 | + "# To install the requirements for the entire chapter, uncomment the lines below and run this cell\n", |
| 98 | + "\n", |
| 99 | + "# ===========================\n", |
| 100 | + "\n", |
| 101 | + "# try :\n", |
| 102 | + "# import google.colab\n", |
| 103 | + "# !curl https://raw.githubusercontent.com/practical-nlp/practical-nlp/master/Ch3/ch3-requirements.txt | xargs -n 1 -L 1 pip install\n", |
| 104 | + "# except ModuleNotFoundError :\n", |
| 105 | + "# !pip install -r \"ch3-requirements.txt\"\n", |
| 106 | + "\n", |
| 107 | + "# ===========================" |
| 108 | + ] |
| 109 | + }, |
| 110 | + { |
| 111 | + "cell_type": "code", |
| 112 | + "execution_count": 3, |
| 113 | + "metadata": {}, |
| 114 | + "outputs": [], |
25 | 115 | "source": [
|
26 | 116 | "#making the required imports\n",
|
27 | 117 | "import warnings #ignoring the generated warnings\n",
|
|
38 | 128 | },
|
39 | 129 | {
|
40 | 130 | "cell_type": "code",
|
41 |
| - "execution_count": 3, |
| 131 | + "execution_count": 4, |
42 | 132 | "metadata": {},
|
43 | 133 | "outputs": [],
|
44 | 134 | "source": [
|
|
49 | 139 | },
|
50 | 140 | {
|
51 | 141 | "cell_type": "code",
|
52 |
| - "execution_count": 4, |
| 142 | + "execution_count": 5, |
53 | 143 | "metadata": {},
|
54 | 144 | "outputs": [],
|
55 | 145 | "source": [
|
|
59 | 149 | },
|
60 | 150 | {
|
61 | 151 | "cell_type": "code",
|
62 |
| - "execution_count": 5, |
| 152 | + "execution_count": 6, |
63 | 153 | "metadata": {},
|
64 | 154 | "outputs": [],
|
65 | 155 | "source": [
|
|
69 | 159 | },
|
70 | 160 | {
|
71 | 161 | "cell_type": "code",
|
72 |
| - "execution_count": 6, |
| 162 | + "execution_count": 7, |
73 | 163 | "metadata": {},
|
74 | 164 | "outputs": [],
|
75 | 165 | "source": [
|
|
91 | 181 | },
|
92 | 182 | {
|
93 | 183 | "cell_type": "code",
|
94 |
| - "execution_count": 7, |
| 184 | + "execution_count": 8, |
95 | 185 | "metadata": {},
|
96 | 186 | "outputs": [],
|
97 | 187 | "source": [
|
|
101 | 191 | },
|
102 | 192 | {
|
103 | 193 | "cell_type": "code",
|
104 |
| - "execution_count": 8, |
| 194 | + "execution_count": 9, |
105 | 195 | "metadata": {},
|
106 | 196 | "outputs": [],
|
107 | 197 | "source": [
|
|
112 | 202 | },
|
113 | 203 | {
|
114 | 204 | "cell_type": "code",
|
115 |
| - "execution_count": 9, |
| 205 | + "execution_count": 10, |
116 | 206 | "metadata": {},
|
117 | 207 | "outputs": [],
|
118 | 208 | "source": [
|
|
122 | 212 | },
|
123 | 213 | {
|
124 | 214 | "cell_type": "code",
|
125 |
| - "execution_count": 10, |
| 215 | + "execution_count": 11, |
126 | 216 | "metadata": {},
|
127 | 217 | "outputs": [],
|
128 | 218 | "source": [
|
|
132 | 222 | },
|
133 | 223 | {
|
134 | 224 | "cell_type": "code",
|
135 |
| - "execution_count": 11, |
| 225 | + "execution_count": 12, |
136 | 226 | "metadata": {},
|
137 | 227 | "outputs": [],
|
138 | 228 | "source": [
|
|
142 | 232 | },
|
143 | 233 | {
|
144 | 234 | "cell_type": "code",
|
145 |
| - "execution_count": 12, |
| 235 | + "execution_count": 13, |
146 | 236 | "metadata": {},
|
147 | 237 | "outputs": [],
|
148 | 238 | "source": [
|
|
153 | 243 | },
|
154 | 244 | {
|
155 | 245 | "cell_type": "code",
|
156 |
| - "execution_count": 13, |
| 246 | + "execution_count": 14, |
157 | 247 | "metadata": {},
|
158 | 248 | "outputs": [],
|
159 | 249 | "source": [
|
|
164 | 254 | },
|
165 | 255 | {
|
166 | 256 | "cell_type": "code",
|
167 |
| - "execution_count": 14, |
| 257 | + "execution_count": 15, |
168 | 258 | "metadata": {},
|
169 | 259 | "outputs": [
|
170 | 260 | {
|
|
173 | 263 | "'projections/model.ckpt-161017'"
|
174 | 264 | ]
|
175 | 265 | },
|
176 |
| - "execution_count": 14, |
| 266 | + "execution_count": 15, |
177 | 267 | "metadata": {},
|
178 | 268 | "output_type": "execute_result"
|
179 | 269 | }
|
|
225 | 315 | "name": "python",
|
226 | 316 | "nbconvert_exporter": "python",
|
227 | 317 | "pygments_lexer": "ipython3",
|
228 |
| - "version": "3.7.0" |
| 318 | + "version": "3.6.13" |
229 | 319 | }
|
230 | 320 | },
|
231 | 321 | "nbformat": 4,
|
|
0 commit comments