跳至主要内容

TensorFlow

Anaconda를 이용하여 Tensorflow 설치

  1. Conda환경을 생성
    #conda create -n 가상환경 이름
    conda create -n tf python=3.6 anaconda

  2. 설치된 가상환경 실행
  3. activate tf
  4. tf 가상환경에서 tensorflow 설치
    pip install tensorflow
        

TensorFlow 개요

TensorFlow는 dataflow graph로 수학 계산과 데이터의 흐름을 나타낸다.
TensorFlow는 dataflow graph를 구성 한 후 session을 생성하여 graph의 일부를 실행한다

Computation Graph

TensorFlow 프로그램은 구성 단계실행 단계로 구성
  • 구성(construction) 단계: 그래프를 조립
  • 실행(execution) 단계: Session을 통해 그래프 연산을 실행

TensorFlow 기본적인 사용법

Argmax

설정한 axis에 따른 가장 큰 값을 가지는 요소의 index를 반환
axis = 0일때 x[0]와 x[1]의 각 요소들을 비교하여 큰 수의 index를 반환하고,
axis = 1일때 x[0][]의 요소들 내 큰 수의 index와 x[1][]의 요소들 내 가장 큰 수의 index를 반환

Reshape

tf.reshape(tensor, shape, name = None)
tensor의 구조를 원하는 shape으로 변환
shape의 한 원소가 -1이라면, 전체 크기가 일정하게 유지되도록 해당 차원의 길이가 자동으로 계산된다.

squeeze

차원 중 크기가 1인 차원을 스칼라값으로 바꿔 해당 차원을 제거한다.

TensorBoard

TensorBard는 TensorFlow에 기록된 로그를 그래프로 시각화시켜 보여주는 도구이다.

TensorBoard 실행

tf.summary.FileWriter('log_dir', graph = sess.graph)
#console에서 실행
#tensorboard --logdir=로그가 기록된 폴더명

评论

此博客中的热门博文

Pandas Plot

pandas.DataFrame.plot.bar import matplotlib.pyplot as plt import pandas as pd import numpy as np df = pd.DataFrame(np.random.rand(5, 4).round(1),                   index=['snail', 'pig', 'elephant','rabbit', 'giraffe'],                   columns=pd.Index(['speed', 'lifespan', 'active', 'cuite'],                   name='Genus')) ax = df.plot(kind='bar',figsize=(10,4), rot = 0) plt.show() ==> output in Pycharm

GIS

GIS 데이터 유형 Vector : 현실 세계를 점, 선, 면으로 표현  Raster : 현실 세계를 픽셀 단위로 표현 점, 선, 면을 Feature라 함 여러개의 Feature가 모이면 Dataset 여러개의 Dataset이 모이면 DataSource dataset은 geometry공간좌표(x, y)와 attribute로 구성 좌표계(coordinate system) 지리적인 데이터정보들을 통합하여 사용할 수 있도록 위치를 정해줌 좌표계의 종류 지리좌표체계 투영좌표체계 https://m.blog.naver.com/PostView.nhn?blogId=rsmilee&logNo=220651379673&proxyReferer=https%3A%2F%2Fwww.google.com%2F Pan 패닝: 마우스 움직임에 따라 해당되는 지도 영역이 보이는것? http://mcms.daegu.ac.kr/user/chodh/user_source/gis01.htm OpenStreetMap은  Mercator projection( "EPSG:3857" )을 사용 ol.proj.transform로 지리좌표( 경도 위도 ) 를  Mercator projection좌표계로 전환 축척 - 지도상에서 1유닛이 나타내는 거리값 Resolution(지도 해상도) - 현재 축척에서 1픽셀이 표현하는 거리값 https://www.muhanit.kr/%EA%B8%B0%EC%88%A0%EB%B8%94%EB%A1%9C%EA%B7%B8/openlayers%EC%9D%B4%EC%9A%A9-map%EC%9C%BC%EB%A1%9C%EB%B6%80%ED%84%B0-%EC%B6%95%EC%B2%99-%EA%B5%AC%ED%95%98%EA%B8%B0 Layer -  热度图层(heatmaplayer) 、 图片图层(imagelayer) 、 切片图层(tilelayer)  和...

Intellij DB Setting

  SQL Dialects → SQL 문법을 선택 파일 배경색 변경 quick documentation을 활용하자!