• 카테고리

    질문 & 답변
  • 세부 분야

    딥러닝 · 머신러닝

  • 해결 여부

    미해결

코드를 그대로 돌렸는데 애로가 나오는 이유가 알고 싶습니다

20.08.21 21:39 작성 조회수 387

0

안녕하십니까 선생님

코드를 그대로 붙여서 실행했는데 다음과 같은 애로 사항이 발생했습니다 

tensorflow도 2.3이고 keras도 설치 되어있는데

어떤 제반 사항이 잘못되었는지 알려주시면 감사드리겠습니다.

ImportError                               Traceback (most recent call last)
~\anaconda3\lib\site-packages\keras\__init__.py in <module>
      2 try:
----> 3     from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
      4 except ImportError:

~\anaconda3\lib\site-packages\tensorflow\__init__.py in <module>
     40 
---> 41 from tensorflow.python.tools import module_util as _module_util
     42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader

~\anaconda3\lib\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

~\anaconda3\lib\site-packages\tensorflow\python\distribute\__init__.py in <module>
     27 from tensorflow.python.distribute import one_device_strategy
---> 28 from tensorflow.python.distribute.experimental import collective_all_reduce_strategy
     29 from tensorflow.python.distribute.experimental import parameter_server_strategy

~\anaconda3\lib\site-packages\tensorflow\python\distribute\experimental\__init__.py in <module>
     24 from tensorflow.python.distribute import parameter_server_strategy
---> 25 from tensorflow.python.distribute import tpu_strategy
     26 # pylint: enable=unused-import

~\anaconda3\lib\site-packages\tensorflow\python\distribute\tpu_strategy.py in <module>
     42 from tensorflow.python.tpu import device_assignment as device_assignment_lib
---> 43 from tensorflow.python.tpu import tpu
     44 from tensorflow.python.tpu import tpu_strategy_util

~\anaconda3\lib\site-packages\tensorflow\python\tpu\tpu.py in <module>
     27 from tensorflow.python.compat import compat as api_compat
---> 28 from tensorflow.python.compiler.xla import xla
     29 from tensorflow.python.framework import device as pydev

~\anaconda3\lib\site-packages\tensorflow\python\compiler\xla\__init__.py in <module>
     22 from tensorflow.python.compiler.xla import jit
---> 23 from tensorflow.python.compiler.xla import xla
     24 # pylint: enable=unused-import

~\anaconda3\lib\site-packages\tensorflow\python\compiler\xla\xla.py in <module>
     24 
---> 25 from tensorflow.compiler.jit.ops import xla_ops
     26 from tensorflow.compiler.jit.ops import xla_ops_grad  # pylint: disable=unused-import

~\anaconda3\lib\site-packages\tensorflow\compiler\jit\ops\xla_ops.py in <module>
      7 
----> 8 from tensorflow.python import pywrap_tfe as pywrap_tfe
      9 from tensorflow.python.eager import context as _context

~\anaconda3\lib\site-packages\tensorflow\python\pywrap_tfe.py in <module>
     28 from tensorflow.python import pywrap_tensorflow
---> 29 from tensorflow.python._pywrap_tfe import *

ImportError: DLL load failed: 지정된 프로시저를 찾을 수 없습니다.

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-1-210029f2541c> in <module>
      1 from __future__ import print_function
----> 2 import keras
      3 from keras.datasets import mnist
      4 from keras.models import Sequential
      5 from keras.layers import Dense, Dropout, Flatten

~\anaconda3\lib\site-packages\keras\__init__.py in <module>
      4 except ImportError:
      5     raise ImportError(
----> 6         'Keras requires TensorFlow 2.2 or higher. '
      7         'Install TensorFlow via `pip install tensorflow`')
      8 

ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via `pip install tensorflow`

답변 1

답변을 작성해보세요.

0

안녕하세요?

텐서플로2.3이 설치되어 있다고 하시니 다른 문제가 의심되지만 다시 한번 pip list로 설치여부를 확인해 주세요.

그리고 딥러닝 패키지들이 자주 변경되어 코드가 작동 안하는 경우도 있습니다. 제가 자주 최신 코드로 업데이트를 하지만요.

지금 문제가 되는 프로그램 이름을 알려주시면 점검해 보겠습니다.

감사합니다.