anishathalye / neural-style

Neural style in TensorFlow! 🎨
https://anishathalye.com/an-ai-that-can-mimic-any-artist/
GNU General Public License v3.0
5.54k stars 1.51k forks source link

OSError: the is not writable or does not have a valid file extension for an image file #173

Closed chengkeng closed 3 years ago

chengkeng commented 3 years ago

Hi! My computer can't work on win10 CUDA 10.1 and 11.1, please help me to see, thank you!

2021-05-04 04:29:30.468895: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found 2021-05-04 04:29:30.469119: 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. WARNING:tensorflow:From W:\Downloads\neural-style-master (1)\neural-style-master\vgg.py:9: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From W:\Downloads\neural-style-master (1)\neural-style-master\vgg.py:11: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2021-05-04 04:29:31.549346: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2021-05-04 04:29:31.552104: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll 2021-05-04 04:29:31.586399: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: name: Quadro RTX 8000 major: 7 minor: 5 memoryClockRate(GHz): 1.77 pciBusID: 0000:0a:00.0 2021-05-04 04:29:31.587397: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found 2021-05-04 04:29:31.588399: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cublas64_100.dll'; dlerror: cublas64_100.dll not found 2021-05-04 04:29:31.589065: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cufft64_100.dll'; dlerror: cufft64_100.dll not found 2021-05-04 04:29:31.589725: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'curand64_100.dll'; dlerror: curand64_100.dll not found 2021-05-04 04:29:31.590373: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusolver64_100.dll'; dlerror: cusolver64_100.dll not found 2021-05-04 04:29:31.591026: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusparse64_100.dll'; dlerror: cusparse64_100.dll not found 2021-05-04 04:29:31.834994: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll 2021-05-04 04:29:31.835196: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1662] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2021-05-04 04:29:31.966367: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix: 2021-05-04 04:29:31.966525: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 2021-05-04 04:29:31.967948: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N Traceback (most recent call last): File "C:\Users\Creator\miniconda3\envs\neural-style\lib\site-packages\PIL\Image.py", line 2152, in save format = EXTENSION[ext] KeyError: ''

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "neural_style.py", line 210, in main imsave(options.output, np.zeros((500, 500, 3))) File "neural_style.py", line 286, in imsave Image.fromarray(img).save(path, quality=95) File "C:\Users\Creator\miniconda3\envs\neural-style\lib\site-packages\PIL\Image.py", line 2154, in save raise ValueError(f"unknown file extension: {ext}") from e ValueError: unknown file extension:

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "neural_style.py", line 289, in main() File "neural_style.py", line 213, in main 'extension for an image file' % options.output) OSError: the is not writable or does not have a valid file extension for an image file

anishathalye commented 3 years ago

does not have a valid file extension for an image file

You need to make sure that the --output <filename> filename has a valid file extension. E.g. .png. So you can do something like --output result.png.