diff --git a/Untitled.ipynb b/Untitled.ipynb index 46bcb07..c9431cf 100644 --- a/Untitled.ipynb +++ b/Untitled.ipynb @@ -2,10 +2,29 @@ "cells": [ { "cell_type": "code", - "execution_count": 9, - "id": "e5ad7f34", - "metadata": {}, - "outputs": [], + "execution_count": 2, + "id": "627fe309", + "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" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/compat/v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "non-resource variables are not supported in the long term\n", + "Imported model (for Places365, 128x128 images)\n" + ] + } + ], "source": [ "import tensorflow.compat.v1 as tf\n", "tf.disable_v2_behavior()\n", @@ -20,8 +39,8 @@ }, { "cell_type": "code", - "execution_count": 10, - "id": "4e847a1f", + "execution_count": 4, + "id": "43c02554", "metadata": {}, "outputs": [], "source": [ @@ -32,8 +51,8 @@ }, { "cell_type": "code", - "execution_count": 11, - "id": "a3ab7344", + "execution_count": 5, + "id": "f46eb227", "metadata": {}, "outputs": [], "source": [ @@ -50,20 +69,20 @@ { "cell_type": "code", "execution_count": 12, - "id": "491be63a", + "id": "023f6e63", "metadata": {}, "outputs": [], "source": [ "def load_demo_image(in_PATH):\n", - " img = np.array(Image.open(in_PATH).convert('RGB'))[np.newaxis] / 255.0\n", + " img = np.array(Image.open(in_PATH).resize((128, 128), Image.ANTIALIAS).convert('RGB'))[np.newaxis] / 255.0\n", " img_p = src.util.preprocess_images_outpainting(img)\n", " return img_p" ] }, { "cell_type": "code", - "execution_count": 13, - "id": "ac6e19b7", + "execution_count": 7, + "id": "7d9b6be5", "metadata": {}, "outputs": [], "source": [ @@ -76,8 +95,8 @@ }, { "cell_type": "code", - "execution_count": 14, - "id": "54877357", + "execution_count": 8, + "id": "46e6b624", "metadata": {}, "outputs": [], "source": [ @@ -98,8 +117,8 @@ }, { "cell_type": "code", - "execution_count": 15, - "id": "15a5515c", + "execution_count": 10, + "id": "f93744f9", "metadata": {}, "outputs": [], "source": [ @@ -122,25 +141,54 @@ }, { "cell_type": "code", - "execution_count": 16, - "id": "93cf5ae7", + "execution_count": 13, + "id": "c70f1f59", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "INFO:tensorflow:Restoring parameters from /home/jovyan/work/src/output/models/model2000.ckpt\n", - "Runned time: 0.317 s\n" + "WARNING:tensorflow:From /home/jovyan/work/src/model.py:20: conv2d (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.Conv2D` instead.\n", + "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/legacy_tf_layers/convolutional.py:424: Layer.apply (from tensorflow.python.keras.engine.base_layer_v1) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Please use `layer.__call__` method instead.\n", + "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" + ] + }, + { + "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", + "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" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Runned time: 4.791 s\n" ] }, { "data": { "text/plain": [ - "{'Output': '/home/jovyan/work/results/test_output.png'}" + "{'Output': './results/test_output.png'}" ] }, - "execution_count": 16, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } diff --git a/handler.py b/handler.py index 411b207..6535b23 100644 --- a/handler.py +++ b/handler.py @@ -22,7 +22,7 @@ return inner def load_demo_image(in_PATH): - img = np.array(Image.open(in_PATH).convert('RGB'))[np.newaxis] / 255.0 + img = np.array(Image.open(in_PATH).resize((128, 128), Image.ANTIALIAS).convert('RGB'))[np.newaxis] / 255.0 img_p = src.util.preprocess_images_outpainting(img) return img_p @@ -60,4 +60,6 @@ res = inference(model_PATH, image) image_str = image_to_path(res) return {'Output': image_str} - \ No newline at end of file + + +handle({'Photo': '/home/jovyan/work/images/test.png'}) \ No newline at end of file diff --git a/job_logs/job-gpu-62b94f70c584fdf74ee42dd3.log b/job_logs/job-gpu-62b94f70c584fdf74ee42dd3.log index d7e9e9a..e294033 100644 --- a/job_logs/job-gpu-62b94f70c584fdf74ee42dd3.log +++ b/job_logs/job-gpu-62b94f70c584fdf74ee42dd3.log @@ -7,3 +7,4 @@ 2022-06-27T06:34:38.468014128Z Imported model (for Places365, 128x128 images) 2022-06-27T06:34:43.13214278Z Usage: python test.py [model_PATH] [in_PATH] [out_PATH] 2022-06-27T06:34:43.648430148Z SYSTEM: Finishing... +2022-06-27T06:34:43.856538313Z SYSTEM: Done! diff --git a/job_logs/job-gpu-62b94f9cb17f87f3a6d7445b.log b/job_logs/job-gpu-62b94f9cb17f87f3a6d7445b.log index 45ca465..9f511c0 100644 --- a/job_logs/job-gpu-62b94f9cb17f87f3a6d7445b.log +++ b/job_logs/job-gpu-62b94f9cb17f87f3a6d7445b.log @@ -12,3 +12,4 @@ 2022-06-27T06:35:20.69064768Z with tf.variable_scope('G', reuse=tf.AUTO_REUSE): 2022-06-27T06:35:20.690694567Z AttributeError: module 'tensorflow' has no attribute 'variable_scope' 2022-06-27T06:35:21.152841351Z SYSTEM: Finishing... +2022-06-27T06:35:21.360045607Z SYSTEM: Error Exists! diff --git a/job_logs/job-gpu-62b94fd2f752e3e25d1d3e30.log b/job_logs/job-gpu-62b94fd2f752e3e25d1d3e30.log index d5132d7..9cf8643 100644 --- a/job_logs/job-gpu-62b94fd2f752e3e25d1d3e30.log +++ b/job_logs/job-gpu-62b94fd2f752e3e25d1d3e30.log @@ -126,3 +126,4 @@ 2022-06-27T06:36:16.867625257Z self._traceback = tf_stack.extract_stack() 2022-06-27T06:36:16.86762792Z 2022-06-27T06:36:17.563235506Z SYSTEM: Finishing... +2022-06-27T06:36:17.774827082Z SYSTEM: Error Exists! diff --git a/job_logs/job-gpu-62b95050f752e3e25d1d3e32.log b/job_logs/job-gpu-62b95050f752e3e25d1d3e32.log index de85ff8..dc87453 100644 --- a/job_logs/job-gpu-62b95050f752e3e25d1d3e32.log +++ b/job_logs/job-gpu-62b95050f752e3e25d1d3e32.log @@ -65,3 +65,4 @@ 2022-06-27T06:38:22.386423007Z checkpoint_prefix) 2022-06-27T06:38:22.386428006Z ValueError: The passed save_path is not a valid checkpoint: /home/jovyan/work/src/output/models/ 2022-06-27T06:38:23.059942491Z SYSTEM: Finishing... +2022-06-27T06:38:23.293018249Z SYSTEM: Error Exists! diff --git a/job_logs/job-gpu-62b95091a393bd89f5bbaa0e.log b/job_logs/job-gpu-62b95091a393bd89f5bbaa0e.log index 505cdb4..cb0eb49 100644 --- a/job_logs/job-gpu-62b95091a393bd89f5bbaa0e.log +++ b/job_logs/job-gpu-62b95091a393bd89f5bbaa0e.log @@ -69,3 +69,4 @@ 2022-06-27T06:39:44.071457371Z fp = builtins.open(filename, "w+b") 2022-06-27T06:39:44.071493873Z IsADirectoryError: [Errno 21] Is a directory: '/home/jovyan/work/results/' 2022-06-27T06:39:45.129121047Z SYSTEM: Finishing... +2022-06-27T06:39:45.330379438Z SYSTEM: Error Exists! diff --git a/job_logs/job-gpu-62b950d6f9c7fbd55d4e9e0f.log b/job_logs/job-gpu-62b950d6f9c7fbd55d4e9e0f.log index 701ba9c..2eacee1 100644 --- a/job_logs/job-gpu-62b950d6f9c7fbd55d4e9e0f.log +++ b/job_logs/job-gpu-62b950d6f9c7fbd55d4e9e0f.log @@ -61,3 +61,4 @@ 2022-06-27T06:40:35.830526984Z 2022-06-27 14:40:35.825663: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7 2022-06-27T06:40:37.078582913Z 2022-06-27 14:40:37.071379: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10 2022-06-27T06:40:39.337113298Z SYSTEM: Finishing... +2022-06-27T06:40:39.545743808Z SYSTEM: Done! diff --git a/job_logs/job-gpu-62b96ec3f901e7972521f6bc.log b/job_logs/job-gpu-62b96ec3f901e7972521f6bc.log index d102a1b..cb78192 100644 --- a/job_logs/job-gpu-62b96ec3f901e7972521f6bc.log +++ b/job_logs/job-gpu-62b96ec3f901e7972521f6bc.log @@ -61,3 +61,4 @@ 2022-06-27T08:48:16.324801304Z 2022-06-27 16:48:16.323386: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7 2022-06-27T08:48:17.556743331Z 2022-06-27 16:48:17.551710: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10 2022-06-27T08:48:19.783798978Z SYSTEM: Finishing... +2022-06-27T08:48:20.006397102Z SYSTEM: Done! diff --git a/job_logs/job-gpu-62b9701b8029151df74612ce.log b/job_logs/job-gpu-62b9701b8029151df74612ce.log index 8c40844..574a6c0 100644 --- a/job_logs/job-gpu-62b9701b8029151df74612ce.log +++ b/job_logs/job-gpu-62b9701b8029151df74612ce.log @@ -13,3 +13,4 @@ 2022-06-27T08:53:59.436729791Z File "<__array_function__ internals>", line 6, in concatenate 2022-06-27T08:53:59.443505289Z ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 250 and the array at index 1 has size 128 2022-06-27T08:53:59.902211373Z SYSTEM: Finishing... +2022-06-27T08:54:00.105456185Z SYSTEM: Error Exists! diff --git a/job_logs/job-gpu-62b971036452cd65a61ca625.log b/job_logs/job-gpu-62b971036452cd65a61ca625.log index 4504859..82d8b40 100644 --- a/job_logs/job-gpu-62b971036452cd65a61ca625.log +++ b/job_logs/job-gpu-62b971036452cd65a61ca625.log @@ -61,3 +61,4 @@ 2022-06-27T08:57:53.434540742Z 2022-06-27 16:57:53.425442: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7 2022-06-27T08:57:54.72057696Z 2022-06-27 16:57:54.713817: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10 2022-06-27T08:57:57.027310115Z SYSTEM: Finishing... +2022-06-27T08:57:57.238472655Z SYSTEM: Done! diff --git a/job_logs/job-gpu-62cae2855cdb670ebbe876b4.log b/job_logs/job-gpu-62cae2855cdb670ebbe876b4.log new file mode 100644 index 0000000..dcbf6d3 --- /dev/null +++ b/job_logs/job-gpu-62cae2855cdb670ebbe876b4.log @@ -0,0 +1,2 @@ +2022-07-10T14:30:36.271615712Z SYSTEM: Preparing env... +2022-07-10T14:30:36.614304501Z script path /home/jovyan/work/src/eval_DAVIS.py not exists diff --git a/job_logs/job-gpu-62cae2b3924968835f19fd7f.log b/job_logs/job-gpu-62cae2b3924968835f19fd7f.log new file mode 100644 index 0000000..8cdf71a --- /dev/null +++ b/job_logs/job-gpu-62cae2b3924968835f19fd7f.log @@ -0,0 +1,2 @@ +2022-07-10T14:31:21.705751641Z SYSTEM: Preparing env... +2022-07-10T14:31:22.044666538Z script path /home/jovyan/work/src/eval_DAVIS.py not exists