diff --git a/Untitled.ipynb b/Untitled.ipynb index 8d2a242..324c547 100644 --- a/Untitled.ipynb +++ b/Untitled.ipynb @@ -3,15 +3,15 @@ { "cell_type": "code", "execution_count": 2, - "id": "aa198a5c", + "id": "dc3b490c", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "2022-07-11 18:02:37.037995: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory\n", - "2022-07-11 18:02:37.038035: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.\n" + "2022-07-21 21:07:47.961364: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory\n", + "2022-07-21 21:07:47.961398: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.\n" ] }, { @@ -39,20 +39,20 @@ }, { "cell_type": "code", - "execution_count": 4, - "id": "0edef439", - "metadata": {}, - "outputs": [], - "source": [ - "model_PATH='./src/output/models/model2000.ckpt'\n", + "execution_count": 3, + "id": "b3725e89", + "metadata": {}, + "outputs": [], + "source": [ + "model_PATH='./src/output/models/model227000.ckpt'\n", "out_PATH='./results/test_output.png'\n", "IMAGE_SZ = 128" ] }, { "cell_type": "code", - "execution_count": 5, - "id": "2b461a3a", + "execution_count": 4, + "id": "db355c13", "metadata": {}, "outputs": [], "source": [ @@ -68,8 +68,8 @@ }, { "cell_type": "code", - "execution_count": 12, - "id": "57ac9ea3", + "execution_count": 5, + "id": "921f7ee4", "metadata": {}, "outputs": [], "source": [ @@ -81,8 +81,8 @@ }, { "cell_type": "code", - "execution_count": 7, - "id": "41670ee1", + "execution_count": 6, + "id": "e654a93b", "metadata": {}, "outputs": [], "source": [ @@ -95,8 +95,8 @@ }, { "cell_type": "code", - "execution_count": 8, - "id": "93bb30e9", + "execution_count": 7, + "id": "c7c78bd4", "metadata": {}, "outputs": [], "source": [ @@ -117,8 +117,8 @@ }, { "cell_type": "code", - "execution_count": 10, - "id": "0c3712cb", + "execution_count": 8, + "id": "112cb0a2", "metadata": {}, "outputs": [], "source": [ @@ -141,8 +141,8 @@ }, { "cell_type": "code", - "execution_count": 13, - "id": "720ed042", + "execution_count": 9, + "id": "bd28ad9e", "metadata": {}, "outputs": [ { @@ -158,28 +158,28 @@ "WARNING:tensorflow:From /home/jovyan/work/src/model.py:79: conv2d_transpose (from tensorflow.python.keras.legacy_tf_layers.convolutional) is deprecated and will be removed in a future version.\n", "Instructions for updating:\n", "Use `tf.keras.layers.Conv2DTranspose` instead.\n", - "INFO:tensorflow:Restoring parameters from ./src/output/models/model2000.ckpt\n" + "INFO:tensorflow:Restoring parameters from ./src/output/models/model227000.ckpt\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "2022-07-11 18:03:35.362439: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory\n", - "2022-07-11 18:03:35.362468: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303)\n", - "2022-07-11 18:03:35.362489: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (notebook): /proc/driver/nvidia/version does not exist\n", - "2022-07-11 18:03:35.362763: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA\n", + "2022-07-21 21:07:52.404094: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory\n", + "2022-07-21 21:07:52.404122: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303)\n", + "2022-07-21 21:07:52.404144: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (notebook): /proc/driver/nvidia/version does not exist\n", + "2022-07-21 21:07:52.404443: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA\n", "To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", - "2022-07-11 18:03:35.385100: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2500000000 Hz\n", - "2022-07-11 18:03:35.399501: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x60885a0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n", - "2022-07-11 18:03:35.399527: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n" + "2022-07-21 21:07:52.426464: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2500000000 Hz\n", + "2022-07-21 21:07:52.440496: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x441b180 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n", + "2022-07-21 21:07:52.440522: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Runned time: 4.791 s\n" + "Runned time: 0.204 s\n" ] }, { @@ -188,7 +188,7 @@ "{'Output': './results/test_output.png'}" ] }, - "execution_count": 13, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } diff --git a/app_spec.yml b/app_spec.yml index 3635ae6..363eb5e 100644 --- a/app_spec.yml +++ b/app_spec.yml @@ -2,7 +2,7 @@ Photo: name: Photo value_type: img - description: 请传入128*128的图片 + description: 请传入128*128的待扩展图片 output: Output: name: Output diff --git a/handler.py b/handler.py index aa8d627..61a3937 100644 --- a/handler.py +++ b/handler.py @@ -8,7 +8,7 @@ import os import sys -model_PATH='./src/output/models/model2000.ckpt' +model_PATH='./src/output/models/model227000.ckpt' out_PATH='./results/test_output.png' IMAGE_SZ = 128 diff --git a/images/.ipynb_checkpoints/test-checkpoint.png b/images/.ipynb_checkpoints/test-checkpoint.png new file mode 100644 index 0000000..441db6b Binary files /dev/null and b/images/.ipynb_checkpoints/test-checkpoint.png differ diff --git a/results/test_output.png b/results/test_output.png index 3aad43a..67c6437 100644 Binary files a/results/test_output.png and b/results/test_output.png differ diff --git a/src/output/models/checkpoint b/src/output/models/checkpoint deleted file mode 100644 index f393a80..0000000 --- a/src/output/models/checkpoint +++ /dev/null @@ -1,2 +0,0 @@ -model_checkpoint_path: "model0.ckpt" -all_model_checkpoint_paths: "model0.ckpt" diff --git a/src/output/models/model0.ckpt.data-00000-of-00001 b/src/output/models/model0.ckpt.data-00000-of-00001 deleted file mode 100644 index 9779b1f..0000000 Binary files a/src/output/models/model0.ckpt.data-00000-of-00001 and /dev/null differ diff --git a/src/output/models/model0.ckpt.index b/src/output/models/model0.ckpt.index deleted file mode 100644 index 337ee51..0000000 Binary files a/src/output/models/model0.ckpt.index and /dev/null differ diff --git a/src/output/models/model0.ckpt.meta b/src/output/models/model0.ckpt.meta deleted file mode 100644 index 7771612..0000000 Binary files a/src/output/models/model0.ckpt.meta and /dev/null differ diff --git a/src/output/models/model2000.ckpt.data-00000-of-00001 b/src/output/models/model2000.ckpt.data-00000-of-00001 deleted file mode 100644 index e34d579..0000000 Binary files a/src/output/models/model2000.ckpt.data-00000-of-00001 and /dev/null differ diff --git a/src/output/models/model2000.ckpt.index b/src/output/models/model2000.ckpt.index deleted file mode 100644 index af7cd69..0000000 Binary files a/src/output/models/model2000.ckpt.index and /dev/null differ diff --git a/src/output/models/model2000.ckpt.meta b/src/output/models/model2000.ckpt.meta deleted file mode 100644 index f540352..0000000 Binary files a/src/output/models/model2000.ckpt.meta and /dev/null differ diff --git a/src/output/models/model227000.ckpt.data-00000-of-00001 b/src/output/models/model227000.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..07c591a Binary files /dev/null and b/src/output/models/model227000.ckpt.data-00000-of-00001 differ diff --git a/src/output/models/model227000.ckpt.index b/src/output/models/model227000.ckpt.index new file mode 100644 index 0000000..b06aa7c Binary files /dev/null and b/src/output/models/model227000.ckpt.index differ diff --git a/src/output/models/model227000.ckpt.meta b/src/output/models/model227000.ckpt.meta new file mode 100644 index 0000000..7dd6de1 Binary files /dev/null and b/src/output/models/model227000.ckpt.meta differ