반응형
반응형

도메인으로 IP주소 확인하기

$ping naver.com

PING naver.com (123.123.123.123) 56(*4) bytes of data.


* 성공시에 아래와 같은 메시지가 계속 찍힌다.

64 bytes from naver.com (123.123.123.123): icmp_seq=1 ttl=64 time=0.019ms

....


* 실패시엔 아래와 같은 메시지가 나온다.

56 packets transmitted, 0 received, 100% pacet loss, time 333ms

....


IP주소로 특정 서버의 포트 열렸는지 확인하기

$telnet 123.123.123.123 80


특정 서버까지 방화벽이 연결됐는지 확인하기

$traceroute naver.com -p 80


반응형
반응형

#모두를 위한 립러닝 강좌 7-1 : Training/test dataset, learning rate, normalization

https://www.youtube.com/watch?v=oSJfejG2C3w&list=PLlMkM4tgfjnLSOjrEJN31gZATbcj_MpUm&index=20



ㅇㅇㅇㅇ

반응형
반응형

1. 아파치 HTTP 웹 서버(https://www.apache.org/)

- 아파치는 아파치 소프트웨어 재단에서 개발된 HTTP 웹 서버를 말한다. 

- 다양한 운영체제에서 사용할 수 있다.

- HTTP 웹 서버이므로 당연히 HTTP 요청을 처리할 수 있는 서버를 뜻한다.

- 클라이언트는 GET, POST 등의 메소드를 활용하여서 정보를 요청하면 아파치는 해당 Request를 받아서 처리해준다.

- 주로 클라이언트와 통신을 주로 담당한다. 

- 응용프로그래밍 언어를 해석하지 못한다. ex) 자바, php, jsp 등

역할 : 정적인 데이터 처리를 주로 담당한다. ex) 단순 html파일 등


2. 톰캣 

- 흔히 WAS (Web Application Server)라고 부른다.

- WAS는 웹 서버(HTTP) + 웹 컨테이너(Jsp, Servlet)의 결합으로 이루어진 것을 말한다.

- 그래서 아파치 없이 톰캣만으로도 웹 서버의 역할을 시킬 수 있다.

역할 : 동적인 데이터 처리를 주로 담당한다. 그러므로 데이터 처리나 db 연결, 비즈니스 로직 처리가 필요한 경우 was를 활용한다. 


Q. 아파치와 톰캣을 둘 다 사용하는 이유는?

- 정적인 처리는 아파치로, 동적인 처리는 톰캣을 쓰도록 활용을 하기 위해서다.


Q. 아파치 같은 웹서버의 역할을 하는 제품들은 무엇이 있는가?

nginx, IIS 등!

주로 리눅스 기반에선 nginx, apache를 많이쓰고, 윈도우에서는 IIS를 통해서 사용한다.


Q. 톰캣 같은 역할을 하는 제품들은 무엇이 있는가?

resin, jeus 등



반응형
반응형

ㅅㄷㄴㅅ

import tensorflow as tf

# --------------------------------------------------------------------
# https://www.tensorflow.org/versions/r0.11/api_docs/python/
# --------------------------------------------------------------------

#-------------------------------------------------- 1. 텐서플로우 기본 Hello,World 출력 p40
#hello = tf.constant("hello, World!") #-- 생성
#sess = tf.Session() #-- 텐서플로우 세션 생성
#print(sess.run(hello)) #-- 출력

#-------------------------------------------------- 2. 텐서플로우로 사칙연산 계산법 p46
#a = tf.placeholder("int32") # --
#b = tf.placeholder("int32") # --
#y = tf.multiply(a, b) #-- a와 b를 곱셈합니다. https://www.tensorflow.org/api_docs/python/tf/multiply
#sess = tf.Session()
#print (sess.run(y, feed_dict={a:2, b:5})) #-- feed_dict :

#-------------------------------------------------- 3. 텐서보드 시각화를 통한 출력 p48
#a = tf.constant(10, name = "a")
#b = tf.constant(2, name = "b")
#y = tf.Variable(a*b, name = "y")
#model = tf.global_variables_initializer #initialize_all_variables() :: https://www.tensorflow.org/api_docs/python/tf/initialize_all_variables
#with tf.Session() as session:
# merged = tf.summary.merge_all() # merge_all_summaries :: https://www.tensorflow.org/api_docs/python/tf/contrib/deprecated/merge_all_summaries
# writer = tf.train.SummaryWriter("/tmp/tensorflowlogs", session.graph)
# session.run(model)
#print (session.run(y))

#-------------------------------------------------- 4.


반응형
반응형
  • https://namu.wiki/w/OpenCL
  • https://namu.wiki/w/OpenGL

[OpenCL]

OpenCL(Open Computing Language)은 개방형 범용 병렬 컴퓨팅 프레임워크이다. CPU, GPU, DSP 등의 프로세서로 이루어진 이종 플랫폼에서 실행되는 프로그램을 작성할 수 있게 해 준다. OpenCL은 커널 코드를 작성하기 위한 C99 기반의 언어인 OpenCL C와 플랫폼을 정의하고 제어하기 위한 API를 포함하고 있다. OpenCL은 작업 기반(task-based) 및 데이터 기반(data-based) 병렬 컴퓨팅을 제공한다.

OpenCL이 만들어진 이유는 OpenGL이나 OpenAL이 만들어진 이유와 비슷하다. OpenGL과 OpenAL은 각각 3차원 컴퓨터 그래픽스 및 컴퓨터 오디오에 대한 산업계의 개방형 표준이다. OpenCL은 비영리 기술 컨소시엄인 크로노스 그룹(Khronos Group)에서 관리하고 있다.


[openGL]

OpenGL(Open Graphics Library)은 1992년 실리콘 그래픽스사에서 만든 2차원 및 3차원 그래픽스 표준 API 규격으로, 프로그래밍 언어 간 플랫폼 간의 교차 응용 프로그래밍을 지원한다. 이 API는 약 250여개 가량의 함수 호출을 이용하여 단순한 기하도형에서부터 복잡한 삼차원 장면을 생성할 수 있다. OpenGL은 현재 CAD, 가상현실, 정보시각화, 비행 시뮬레이션 등의 분야에서 활용되고 있다. 또한 컴퓨터 게임 분야에서도 널리 활용되고 있으며, 마이크로소프트사의 Direct3D와 함께 컴퓨터 그래픽 세계를 양분하고 있다. Direct3D와는 달리, 표준안이 여러 관련 업체의 토론과 제안으로 이루어지기에 버전 업데이트는 느린 편이다. OpenGL을 사용하여 개발된 대표적인 게임은 이드 소프트웨어 퀘이크, 둠3 시리즈이다. 현재 비영리 기술 컨소시엄인 크로노스 그룹에 의하여 관리되고 있다.

반응형
반응형

7. [Mac] 에서 텐서플로우(Tensorflow) GPU 설치하기


원문 : https://www.tensorflow.org/install/install_mac


  • TensorFlow with GPU support. TensorFlow programs typically run significantly faster on a GPU than on a CPU. Therefore, if your system has a NVIDIA CUDA GPU meeting the prerequisites shown below and you need to run performance-critical applications, you should ultimately install this version.

Requirements to run TensorFlow with GPU support

If you are installing TensorFlow with GPU support using one of the mechanisms described in this guide, then the following NVIDIA software must be installed on your system:

  • CUDA Toolkit 8.0. For details, see NVIDIA's documentation. Ensure that you append the relevant CUDA pathnames to the LD_LIBRARY_PATH environment variable as described in the NVIDIA documentation.
  • The NVIDIA drivers associated with CUDA Toolkit 8.0.
  • cuDNN v5.1. For details, see NVIDIA's documentation. Ensure that you create the CUDA_HOMEenvironment variable as described in the NVIDIA documentation.
  • GPU card with CUDA Compute Capability 3.0 or higher. See NVIDIA documentation for a list of supported GPU cards.

If you have an earlier version of the preceding packages, please upgrade to the specified versions. If upgrading is not possible, you may still run TensorFlow with GPU support, but only if you do both of the following:

  • Install TensorFlow from sources (as described in Installing TensorFlow from Sources.
  • Install or upgrade to at least the following NVIDIA versions:
    • CUDA toolkit 7.0 or greater
    • cuDNN v3 or greater
    • GPU card with CUDA Compute Capability 3.0 or higher.



1) 본인 PC에 NVIDIA GPU가 있는지 확인하기



사과 > 이 MAC에 관하여.. > 개요 > 그래픽 

본인 맥북은 2015년형 맥북 레티나 (macbook pro retina 15 inch) - Intel Iris 그래픽 카드를 쓰고있다...윽!


[window에서 확인하는 방법]

윈도우키+R > dxdiag > 디스플레이> AMD Radeon (TM) R5 340X 


2) CUDA 설치

NVIDIA CUDA란? (https://namu.wiki/w/CUDA)

NVIDIA GPU에서만 사용할 수 있습니다.. 


3) Tensorflow GPU 설치

방법1) cmd로 설치

pip install --upgrade tensorflow-gpu # for Python 2.7 and GPU

pip3 install --upgrade tensorflow-gpu # for Python 3.n and GPU


방법2) Pycharm 으로 설치


File > Default Settings .. 



Project Interpreter > 하단 Install 클릭 > Tensorflow-gpu 검색



설치 중 ... 



tensorflow-gpu 버전이 설치된 것을 확인 가능하다.


4) GPU 예제 실행해보기

테스트 진행




궁금한 점

NVIDIA GPU가 아닌 라데온이나 다른 그래픽 카드에서는 CUDA를 실행할 순 없을까?.. 없당.

*http://s3delta.tistory.com/401 > 썰일뿐이군.. 

*https://www.quora.com/Can-CUDA-work-with-AMD-Radeon-HD-8330-with-12Gb-RAM > 단호하네....


결론은 안되니까.. Open CL과 Open GL은 뭐지 알아봐야겠다.



참고 링크


반응형
반응형

#모두를 위한 립러닝 강좌 7-2 : Training/Testing 데이타 셋

https://www.youtube.com/watch?v=KVv1nMSlPzY&list=PLlMkM4tgfjnLSOjrEJN31gZATbcj_MpUm&index=19


*어떠한 모델이 좋은 모델인가?


전체 데이터 중에 70%는 Training Set으로 나머지 30%는 Testing set로 남겨두고 30%는 절대 사용해선 안된다. 그리고 30%의 Training set를 다시 70%는 트레이닝 데이터로 나머지 30%는 Validation 체크를 하기 위한 값으로 남겨둔다. 여기서 Validation 체크란 rate나 람다같은 수를 수정 변경할 경우 쓸 validation 체크용 데이터이다.


*Online learning이란?

100만개의 데이터 세트가 있을 경우, 100만개의 데이터 세트를 10만개씩 나누어서 Model을 학습시키는데 이때, 첫번째 학습한 10만개에 대한 학습 결과가 두번째 학습시키는 10만개의 데이터에 반영 되어야 한다는 방법론이다. 


*MINIST Dataset

사람들이 적어 놓은 숫자들을 컴퓨터가 정확히 알아낼 수 있는지 학습시키는 데이터 세트이다. 미국에서 사람들이 우편번호를 쓸 때, 날려쓰는 경우가 있는데 그 일을 컴퓨터를 통해서 시키기 위해서 나온 방법이다. 이것 역시도, train-inmages-idx3, train-labels 트레이닝 세트와 t10k-images, t10k-labels 테스트 세트가 있을 때 우리는 우리가 가진 모델이 얼마나 정확한 모델을 가졌는지 확인하는 작업은 매우 간단한 일이 될 것이다. y값 (레이블값)과 모델이 예측한 값을 비교하여서 100개 중에 10개 맞으면 10% 정확한 것이고. 100개 중에 90개를 맞췄다면 90%의 정확도를 가졌다고 할 수 있다.


반응형
반응형

pip 명령어가 안먹히거나, pycharm에서 해당 에러메시지로 설치가 안되는 경우 (SSL: CERTIFICATE_VERIFY_FAILED)




Collecting pip==9.0.1

  Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645) - skipping


  Could not find a version that satisfies the requirement pip==9.0.1 (from versions: )

No matching distribution found for pip==9.0.1


1. 수정할 파일 경로
C:\Users\사용자 이름\AppData\Local\Programs\Python\Python35\Lib\site-packages\pip\_vendor\requests\sessions.py

2. sessions.py 수정

   .............     

   #: SSL Verification default. False #★

        self.verify = False

   .............

sessions.py에 있는 모든 verify=True로 되어있는 것을 False로 모두 바꾼다!!

3. 다시 pycharm을 통해서 tensorflow 재설치

4. 설치완료 후, Tensorlfow 예제 실행

import tensorflow as tf


hello = tf.constant('Hello, TensorFlow!')

sess = tf.Session()

print(sess.run(hello))

5. 결과

C:\Users\Aileen\AppData\Local\Programs\Python\Python35\python.exe E:/skcomms/PycharmProject/testProject/HelloTensor.py

b'Hello, TensorFlow!'


E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "CountExtremelyRandomStats" device_type: "CPU"') for unknown op: CountExtremelyRandomStats

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "FinishedNodes" device_type: "CPU"') for unknown op: FinishedNodes

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "GrowTree" device_type: "CPU"') for unknown op: GrowTree

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ReinterpretStringToFloat" device_type: "CPU"') for unknown op: ReinterpretStringToFloat

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "SampleInputs" device_type: "CPU"') for unknown op: SampleInputs

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ScatterAddNdim" device_type: "CPU"') for unknown op: ScatterAddNdim

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNInsert" device_type: "CPU"') for unknown op: TopNInsert

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNRemove" device_type: "CPU"') for unknown op: TopNRemove

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TreePredictions" device_type: "CPU"') for unknown op: TreePredictions

E c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "UpdateFertileSlots" device_type: "CPU"') for unknown op: UpdateFertileSlots


Process finished with exit code 0



나머지 메시지들은 에러가 아니라 정상이고, windows 버전이 아직 안정적이지 않아서 뜨는 오류!


젠장..ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅜㅠㅠㅠ을마나 삽질한거야 

반응형

+ Recent posts