본문 바로가기

tensorflow

(7)
windows 에서 pip install pycocotools 로 설치가 안 된다. 2020년 6월 18일 윈도우 10, Python 3.7-64, 환경에서 pip install pycocotools 명령으로 설치를 진행하였으나, 에러가 발생하였다. 에러메시지 Running setup.py clean for pycocotools Failed to build pycocotools Installing collected packages: pycocotools Running setup.py install for pycocotools ... error ERROR: Command errored out with exit status 1: command: 'd:\pyenvs\aigpu_tf2_3764\scripts\python.exe' -u -c 'import sys, setup..
[YOLO] shape_optimizer failed: Invalid argument, remapper failed: Invalid argument, layout failed: Invalid argument qqwweee 의 keras-yolo3 를 실행하다가 다음과 같은 에러가 발생하였다. ( 내 실행환경은 tensorflow 1.15 였음. ) E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] shape_optimizer failed: Invalid argument: Subshape must have computed start >= end since stride is negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1) E tensorflow/core/grappler/optimizers/meta_op..
tensorflow 2.1 : Could not load dynamic library 'libnvinfer.so.6' ubuntu + anaconda3 + python3.6 + tensorflow2.1 설치된 환경에서 import tensorflow as tf 를 하였을 때 'libnvinfer.so.6' 등의 라이브러리를 로드하지 못하였다는 경고메시지( 메시지 첫머리의 W 는 Warning 이란 뜻. )가 나온다. 검색해 보니, Nvidia gpu 의 TensorRT 라이브러리에 관련된 경고메시지이며, 일단 무시해도 된다고 한다. 경고메시지 >>> import tensorflow as tf 2020-03-18 17:20:22.911535: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnv..
[TENSORFLOW] cpu버전 tensorflow 1.6 이상에서 DLL 초기화 루틴을 실행할 수 없습니다 에러. cpu버전의 tensorflow 를 윈도우 피씨(한국어 윈도우 10)에 설치해서 잘 테스트해 보고 있었다. 그런데, 오늘 tensorflow 를 다시 설치하고, 테스트 하려 하였더나, import tensorflow as tf 문에서 에러가 발생했다.에러 메시지는 대략 다음과 같았다. File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 658, in _load_unlocked File "", line 571, in module_from_spec File "", line 922, in create_module File "", ..
[TensorFlow] tensorflow 1.6.0 No module named '_pywrap_tensorflow_internal' 에러 window 10, 64bit, python 3.6.3 64bit 환경에서 tensorflow (cpu) 를 새롭게 설치하여 import 하였을 때 에러가 발생했다.에러는 ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' 및 ImportError: DLL load failed: DLL 초기화 루틴을 실행할 수 없습니다. 보통은 이 메시지는 visual c++ 2015 redistributable (64bit) 가 안 깔려있는 경우에 발생하였었다. 하지만, 이번에는 다른 문제였다.간략히 결론을 말하면, tensorflow cpu 1.6.0 버전에서 문제가 발생했었고, 1.5.0 버전으로 버전을 낮추어 다시 깔아 문제가 해결됐다. (문제해..
[Tensorfow] 초간단 회귀모형 변형 Sung Kim 교수의 모두의 딥러닝 강의 중 간단한 선형회귀모델을 텐서플로우 코드로 구하는 예제를 따라해 보고, hypothesis 모델의 식을 예제의 1차식 (직선) 에서 2차 다항식으로 바꾸어 돌려봄. 트레이닝에 사용하는 데이터도 y = x*x 에 가까운 값을 주어 보았음. 잘 구해짐. 하지만, 트레이닝 데이터를 얼토당토않은 랜덤한 값을 주면, 트레이닝 하면서 쉽게 발산해 버리는 듯 하다. 3차 다항식 모델도 역시 잘 발산하는 듯 하다. import tensorflow as tf x = tf.placeholder(tf.float32, shape=[None]) y = tf.placeholder(tf.float32, shape=[None]) w2 = tf.Variable(tf.random_uniform..
[TENSORFLOW] 절대값 import tensorflow as tf x = tf.placeholder(tf.float32)y = tf.cond(x