|
63 | 63 | "from tensorflow import keras\n", |
64 | 64 | "assert tf.__version__ >= \"2.0\"\n", |
65 | 65 | "\n", |
66 | | - "if not tf.test.is_gpu_available():\n", |
| 66 | + "if not tf.config.list_physical_devices('GPU'):\n", |
67 | 67 | " print(\"No GPU was detected. CNNs can be very slow without a GPU.\")\n", |
68 | 68 | " if IS_COLAB:\n", |
69 | 69 | " print(\"Go to Runtime > Change runtime and select a GPU hardware accelerator.\")\n", |
|
285 | 285 | "name": "stdout", |
286 | 286 | "output_type": "stream", |
287 | 287 | "text": [ |
288 | | - "The given SavedModel contains the following tag-sets:\r\n", |
289 | | - "serve\r\n" |
| 288 | + "The given SavedModel contains the following tag-sets:\n", |
| 289 | + "serve\n" |
290 | 290 | ] |
291 | 291 | } |
292 | 292 | ], |
|
303 | 303 | "name": "stdout", |
304 | 304 | "output_type": "stream", |
305 | 305 | "text": [ |
306 | | - "The given SavedModel MetaGraphDef contains SignatureDefs with the following keys:\r\n", |
307 | | - "SignatureDef key: \"__saved_model_init_op\"\r\n", |
308 | | - "SignatureDef key: \"serving_default\"\r\n" |
| 306 | + "The given SavedModel MetaGraphDef contains SignatureDefs with the following keys:\n", |
| 307 | + "SignatureDef key: \"__saved_model_init_op\"\n", |
| 308 | + "SignatureDef key: \"serving_default\"\n" |
309 | 309 | ] |
310 | 310 | } |
311 | 311 | ], |
|
322 | 322 | "name": "stdout", |
323 | 323 | "output_type": "stream", |
324 | 324 | "text": [ |
325 | | - "The given SavedModel SignatureDef contains the following input(s):\r\n", |
326 | | - " inputs['flatten_2_input'] tensor_info:\r\n", |
327 | | - " dtype: DT_FLOAT\r\n", |
328 | | - " shape: (-1, 28, 28, 1)\r\n", |
329 | | - " name: serving_default_flatten_2_input:0\r\n", |
330 | | - "The given SavedModel SignatureDef contains the following output(s):\r\n", |
331 | | - " outputs['dense_5'] tensor_info:\r\n", |
332 | | - " dtype: DT_FLOAT\r\n", |
333 | | - " shape: (-1, 10)\r\n", |
334 | | - " name: StatefulPartitionedCall:0\r\n", |
335 | | - "Method name is: tensorflow/serving/predict\r\n" |
| 325 | + "The given SavedModel SignatureDef contains the following input(s):\n", |
| 326 | + " inputs['flatten_2_input'] tensor_info:\n", |
| 327 | + " dtype: DT_FLOAT\n", |
| 328 | + " shape: (-1, 28, 28, 1)\n", |
| 329 | + " name: serving_default_flatten_2_input:0\n", |
| 330 | + "The given SavedModel SignatureDef contains the following output(s):\n", |
| 331 | + " outputs['dense_5'] tensor_info:\n", |
| 332 | + " dtype: DT_FLOAT\n", |
| 333 | + " shape: (-1, 10)\n", |
| 334 | + " name: StatefulPartitionedCall:0\n", |
| 335 | + "Method name is: tensorflow/serving/predict\n" |
336 | 336 | ] |
337 | 337 | } |
338 | 338 | ], |
|
350 | 350 | "name": "stdout", |
351 | 351 | "output_type": "stream", |
352 | 352 | "text": [ |
353 | | - "\r\n", |
354 | | - "MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:\r\n", |
355 | | - "\r\n", |
356 | | - "signature_def['__saved_model_init_op']:\r\n", |
357 | | - " The given SavedModel SignatureDef contains the following input(s):\r\n", |
358 | | - " The given SavedModel SignatureDef contains the following output(s):\r\n", |
359 | | - " outputs['__saved_model_init_op'] tensor_info:\r\n", |
360 | | - " dtype: DT_INVALID\r\n", |
361 | | - " shape: unknown_rank\r\n", |
362 | | - " name: NoOp\r\n", |
363 | | - " Method name is: \r\n", |
364 | | - "\r\n", |
365 | | - "signature_def['serving_default']:\r\n", |
366 | | - " The given SavedModel SignatureDef contains the following input(s):\r\n", |
367 | | - " inputs['flatten_2_input'] tensor_info:\r\n", |
368 | | - " dtype: DT_FLOAT\r\n", |
369 | | - " shape: (-1, 28, 28, 1)\r\n", |
370 | | - " name: serving_default_flatten_2_input:0\r\n", |
371 | | - " The given SavedModel SignatureDef contains the following output(s):\r\n", |
372 | | - " outputs['dense_5'] tensor_info:\r\n", |
373 | | - " dtype: DT_FLOAT\r\n", |
374 | | - " shape: (-1, 10)\r\n", |
375 | | - " name: StatefulPartitionedCall:0\r\n", |
376 | | - " Method name is: tensorflow/serving/predict\r\n" |
| 353 | + "\n", |
| 354 | + "MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:\n", |
| 355 | + "\n", |
| 356 | + "signature_def['__saved_model_init_op']:\n", |
| 357 | + " The given SavedModel SignatureDef contains the following input(s):\n", |
| 358 | + " The given SavedModel SignatureDef contains the following output(s):\n", |
| 359 | + " outputs['__saved_model_init_op'] tensor_info:\n", |
| 360 | + " dtype: DT_INVALID\n", |
| 361 | + " shape: unknown_rank\n", |
| 362 | + " name: NoOp\n", |
| 363 | + " Method name is: \n", |
| 364 | + "\n", |
| 365 | + "signature_def['serving_default']:\n", |
| 366 | + " The given SavedModel SignatureDef contains the following input(s):\n", |
| 367 | + " inputs['flatten_2_input'] tensor_info:\n", |
| 368 | + " dtype: DT_FLOAT\n", |
| 369 | + " shape: (-1, 28, 28, 1)\n", |
| 370 | + " name: serving_default_flatten_2_input:0\n", |
| 371 | + " The given SavedModel SignatureDef contains the following output(s):\n", |
| 372 | + " outputs['dense_5'] tensor_info:\n", |
| 373 | + " dtype: DT_FLOAT\n", |
| 374 | + " shape: (-1, 10)\n", |
| 375 | + " name: StatefulPartitionedCall:0\n", |
| 376 | + " Method name is: tensorflow/serving/predict\n" |
377 | 377 | ] |
378 | 378 | } |
379 | 379 | ], |
|
1677 | 1677 | "name": "python", |
1678 | 1678 | "nbconvert_exporter": "python", |
1679 | 1679 | "pygments_lexer": "ipython3", |
1680 | | - "version": "3.7.3" |
| 1680 | + "version": "3.7.6" |
1681 | 1681 | } |
1682 | 1682 | }, |
1683 | 1683 | "nbformat": 4, |
1684 | | - "nbformat_minor": 2 |
| 1684 | + "nbformat_minor": 4 |
1685 | 1685 | } |
0 commit comments