72496


[実行環境]

  * Windows10 64bit

  * python 3.8.5 64bit

  * anaconda 3.8.5

  * pip 20.3

  * tensorflow 2.3.1

  * keras 2.4.3

  * numpy 1.18.5

  * cuda 10.1

  * cuDNN 10.1

keras-yolo3を用いた顔を検出するための学習にあたって  
タイトルにもありますエラーが発生したので解決方法を教えていただきたいです。

[出力内容]  
※分かりやすいと思うのでJupitar notebookで実行したときの内容を書きました。  
アナコンダプロンプト上で実行したときもおおよそ同じ内容のエラーが発生します。

[code]

    OSError                                   Traceback (most recent call last)
    <ipython-input-1-be77ab001e17> in <module>
          1 import numpy as np
    ----> 2 import keras.backend as K
          3 from keras.layers import Input, Lambda
          4 from keras.models import Model
          5 from keras.optimizers import Adam
    
    ~\AppData\Roaming\Python\Python38\site-packages\keras\__init__.py in <module>
          1 
          2 try:
    ----> 3     from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
          4 except ImportError:
          5     raise ImportError(
    
    ~\AppData\Roaming\Python\Python38\site-packages\tensorflow\__init__.py in <module>
         39 import sys as _sys
         40 
    ---> 41 from tensorflow.python.tools import module_util as _module_util
         42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
         43 
    
    ~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\__init__.py in <module>
         45 from tensorflow.python import data
         46 from tensorflow.python import distribute
    ---> 47 from tensorflow.python import keras
         48 from tensorflow.python.feature_column import feature_column_lib as feature_column
         49 from tensorflow.python.layers import layers
    
    ~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\keras\__init__.py in <module>
         25 
         26 # See b/110718070#comment18 for more details about this import.
    ---> 27 from tensorflow.python.keras import models
         28 
         29 from tensorflow.python.keras.engine.input_layer import Input
    
    ~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\keras\models.py in <module>
         24 from tensorflow.python.keras import metrics as metrics_module
         25 from tensorflow.python.keras import optimizers
    ---> 26 from tensorflow.python.keras.engine import functional
         27 from tensorflow.python.keras.engine import sequential
         28 from tensorflow.python.keras.engine import training
    
    ~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\keras\engine\functional.py in <module>
         36 from tensorflow.python.keras.engine import keras_tensor
         37 from tensorflow.python.keras.engine import node as node_module
    ---> 38 from tensorflow.python.keras.engine import training as training_lib
         39 from tensorflow.python.keras.engine import training_utils
         40 from tensorflow.python.keras.saving.saved_model import network_serialization
    
    ~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\keras\engine\training.py in <module>
         48 from tensorflow.python.keras.engine import base_layer_utils
         49 from tensorflow.python.keras.engine import compile_utils
    ---> 50 from tensorflow.python.keras.engine import data_adapter
         51 from tensorflow.python.keras.engine import training_utils
         52 from tensorflow.python.keras.mixed_precision.experimental import loss_scale_optimizer as lso
    
    ~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\keras\engine\data_adapter.py in <module>
         54 
         55 try:
    ---> 56   from scipy import sparse as scipy_sparse  # pylint: disable=g-import-not-at-top
         57 except ImportError:
         58   scipy_sparse = None
    
    ~\AppData\Roaming\Python\Python38\site-packages\scipy\__init__.py in <module>
        134 
        135     # Allow distributors to run custom init code
    --> 136     from . import _distributor_init
        137 
        138     from scipy._lib import _pep440
    
    ~\AppData\Roaming\Python\Python38\site-packages\scipy\_distributor_init.py in <module>
         59             os.chdir(libs_path)
         60             for filename in glob.glob(os.path.join(libs_path, '*dll')):
    ---> 61                 WinDLL(os.path.abspath(filename))
         62         finally:
         63             os.chdir(owd)
    
    ~\anaconda3\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error, winmode)
        379 
        380         if handle is None:
    --> 381             self._handle = _dlopen(self._name, mode)
        382         else:
        383             self._handle = handle
    
    OSError: [WinError 193] %1 は有効な Win32 アプリケーションではありません。
    
    
[/code]


CC BY-SA 4.0
2020-12-03T10:31:29.097
72367
2020-12-08T07:25:59.560
2020-12-08T07:25:59.560
41740
41740
question
python
OS Error [WinError 193]の解決方法を教えてください(keras-yolo3)


原因はよく分からなかったですが解決できました!  
こちらのサイトが参考になったので載せておきます。  
後はタイトルとか一部文章は編集しておきます。  
回答してくださった方ありがとうございました!  
<https://qiita.com/tfukumori/items/d1f79078803d8a7fe103>


CC BY-SA 4.0
2020-12-08T07:24:09.593
72496
2020-12-08T07:24:09.593
41740
72367
answer