본문 바로가기

tensorflow33

Tensorflow gpu 설치시 맞춰야 하는 버전 Tensorflow gpu 설치시 맞춰야 하는 버전 버전 안 맞춰서 삽질 겁나했다....ㅠ - ubuntu = 16.04 (추천 사항)- CUDA Toolkit = 9.0- cuDNN = 7.2- python = 3.6 2018. 11. 5.
[section_12_lab] Dynamic RNN & RNN with Time Series Data Dynamic RNN사실 우리가 실제 딥러닝을 구현할 기회가 생긴다면 단어의 길이(Sequence length)는 일정하지 않을것이다. 이런 문제를 해결하는 것을 Dynamic RNN이라고 한다.이런 문제는 sequence_length의 값을 줌으로써 해겨한다. (왼쪽그림)만약에 5개의 단어의 길이(Sequence length)를 가지는 데이터에 sequence_length를 [5,3,4]를 주게 된다면 output의 결과는 0으로 나오게 된다.(padding과 같은 효과를 얻는다.예시 url : https://github.com/hunkim/DeepLearningZeroToAll/blob/master/lab-12-0-rnn_basics.ipynb RNN with Time Series Data시간에 따라.. 2018. 6. 1.
[section_12_lab] Long Sequence RNN (by Stacked RNN + Softmax layer) 문장을 입력하였을 때 자동적으로 학습하는 코딩하기(by Hyper parameter)import tensorflow as tf import random import numpy as np from tensorflow.contrib import rnn import pprint import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' sample = " if you want you" idx2char = list(set(sample)) # index -> char char2idx = {c: i for i, c in enumerate(idx2char)} # char -> idex # hyper parameters dic_size = len(char2idx) # RNN input .. 2018. 6. 1.
[section_12_lab] Hi Hello Learning (sequence 학습) 기본 RNN 설계 입, 출력을 설계한다. 실행 코드 및 결과import tensorflow as tf import random import numpy as np from tensorflow.contrib import rnn import pprint import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' idx2char = ['h', 'i', 'e', 'l', 'o'] # Teach hello: hihell -> ihello x_data = [[0, 1, 0, 2, 3, 3]] # hihell x_one_hot = [[[1, 0, 0, 0, 0], # h 0 [0, 1, 0, 0, 0], # i 1 [1, 0, 0, 0, 0], # h 0 [0, 0, 1, 0, 0], .. 2018. 6. 1.