본문 바로가기

AI & 머신러닝 coding skill56

[SEQUENCES, TIME SERIES AND PREDICTION] Preparing features and labels 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Sequences, Time Series and Prediction 과정의 1주차 Sequences and Prediction 챕터의 코드 예제입니다. time serise data를 traing data 포멧에 맞게 변환하는 과정을 각 print()마다 볼 수 있도록 되어있다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 import tensorflow as tf import numpy.. 2020. 11. 11.
[SEQUENCES, TIME SERIES AND PREDICTION] Sequences and Prediction 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Sequences, Time Series and Prediction 과정의 1주차 Sequences and Prediction 챕터의 코드 예제입니다. time series data를 생성하고, 간단한 moving average를 이용해서 forcasting하는 과정입니다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 .. 2020. 11. 11.
[NATURAL LANGUAGE PROCESSING IN TENSORFLOW] Sequence models and Literature 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Natural Language Processing in TensorFlow 과정의 4주차 sequence models and literature챕터의 코드 예제입니다. laurence to poetry 한 문학의 문장들을 학습시킨 모델을 이용해서, 첫 몇 단어를 seed로 모델에 주면, 이후 단어들을 예측해서 문장들을 자동으로 써나가는 코드이다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 5.. 2020. 11. 11.
[NATURAL LANGUAGE PROCESSING IN TENSORFLOW] Sequence models 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Natural Language Processing in TensorFlow 과정의 3주차 sequence models 챕터의 코드 예제입니다. 1) imdb reviews 데이터 로드 2) training과 testing data 분리 3) 미리 token화된 subword 데이터를 로드해서 token으로 사용 4) LSTM 모델 구성 -> multi bidirectional LSTM 5) vecs.tsv 와meta.tsv를 만들어서 단어 비쥬얼라이즈tool에서 로드해서 각 단어의 의미별 vector 군집도를 확인하는데 사용할수도있다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1.. 2020. 11. 11.
[NATURAL LANGUAGE PROCESSING IN TENSORFLOW] subwords text encoder 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Natural Language Processing in TensorFlow 과정의 2주차 word embeddings 챕터의 코드 예제입니다. 1) imdb reviews 데이터 로드 2) training과 testing data 분리 3) 미리 token화된 subword 데이터를 로드해서 token으로 사용 4) Deep Nural Network 모델 구성 -> 첫 layer에 Embedding layer를 사용 5) vecs.tsv 와meta.tsv를 만들어서 단어 비쥬얼라이즈tool에서 로드해서 각 단어의 의미별 vector 군집도를 확인하는데 사용할수도있다. 1 2 3 4 5 6 7 8 9 10 1.. 2020. 11. 11.
training data in tensorflow site dataset으로 사용하라고, tensorflow에서 이미 준비해놓은 데이터들은 아래 링크에 있다. www.tensorflow.org/datasets/catalog/overview 데이터 세트 | TensorFlow Datasets Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trade www.tensorf.. 2020. 11. 11.
[NATURAL LANGUAGE PROCESSING IN TENSORFLOW] Word embeddings 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Natural Language Processing in TensorFlow 과정의 2주차 word embeddings 챕터의 코드 예제입니다. 1) imdb reviews 데이터 로드 2) training과 testing data 분리 3) 문장 token화 4) Deep Nural Network 모델 구성 -> 첫 layer에 Embedding layer를 사용 5) vecs.tsv 와meta.tsv를만들어서 단어 비쥬얼라이즈에 사용할수도있다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3.. 2020. 11. 11.
[NATURAL LANGUAGE PROCESSING IN TENSORFLOW] Text to sequence and padding 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Natural Language Processing in TensorFlow 과정의 1주차 introduction sentiment in text 챕터의 코드 예제입니다. 1) 문장을 token화 한다 2) 문장을 token 들의 sequence로 변환한다 3) 문장 길이를 동일하게 하도록 padding한다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 import tensorflow as tf from tensorflow import keras from tensorflow.keras.preproce.. 2020. 11. 11.