본문 바로가기

전체 글99

[CONVOLUTIONAL NEURAL NETWORKS IN TENSORFLOW] Multi-class classifier 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Convolutional Neural Networks in TensorFlow 과정의 4주차 Multiclass Classifications 챕터의 코드 예제입니다. 1) 알파벳을 손가락 모양으로 표현한 이미지 dataset인, sign MNIST dataset을 다운로드받는다. 2) image dataset을 image set과 label set으로 나누는 get_data함수 구현 3) Training set과 Test set 디렉토리 경로 설정 4) np.expand_dims mathod를 사용해서 이미지데이타에서 차원을 하나 추가한다. (하나의 이미지는 2차원 + 색깔차원 필요) 5) preproces.. 2020. 11. 16.
[CONVOLUTIONAL NEURAL NETWORKS IN TENSORFLOW] Horses vs. humans using Transfer Learning 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Convolutional Neural Networks in TensorFlow 과정의 3주차 Transfer Learning 챕터의 코드 예제입니다. 1) 다른 사람이 이미 training 시켜 놓은 layer와 weight를 이용하여 모델을 구성할 수 있다. InceptionV3 model와 weight를 다운로드받는다. 2) 내 모델의 input으로 쓰일 Inception model의 'mixed7' layer의 output을, last_output 으로 선언한다. 3) last_output을 input으로 사용할 수 있도록, flatten하고 내 모델의 dense layer에 입력으로 넣는다. 4) d.. 2020. 11. 16.
[CONVOLUTIONAL NEURAL NETWORKS IN TENSORFLOW] Full cats vs. dogs using augmentation 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Convolutional Neural Networks in TensorFlow 과정의 2주차 Augmentation: A technique to avoid overfitting 챕터의 코드 예제입니다. 1) cats and dogs dataset 다운로드 2) Training set과 Test set 디렉토리 경로 설정 3) image dataset을 traing set과 test set으로 나누는 spilt_data함수 구현 4) Conv2D 3개 layer을 이용한 모델 구성 5) preprocessing.image name space의 ImageDataGenerator를 이용해서, 밝기를 1/255로 .. 2020. 11. 16.
[CONVOLUTIONAL NEURAL NETWORKS IN TENSORFLOW] Attempt the cats vs. dogs Kaggle challenge! 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Convolutional Neural Networks in TensorFlow 과정의 1주차 Exploring a Larger Dataset 챕터의 코드 예제입니다. Attempt the cats vs. dogs Kaggle challenge! 1) cats and dogs dataset 다운로드 2) Training set과 Test set 디렉토리 경로 설정 3) image dataset을 traing set과 test set으로 나누는 spilt_data함수 구현 4) Conv2D 3개 layer을 이용한 모델 구성 5) preprocessing.image name space의 ImageDataGene.. 2020. 11. 16.
[INTRODUCTION TO TENSORFLOW FOR ARTIFICIAL INTELLIGENCE, MACHINE LEARNING, AND DEEP LEARNING] Handling Complex Images 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning 과정의 4주차 Using Real-world Images 챕터의 코드 예제입니다. Handling Complex Images 1) Happy or Sad image dataset를 받는다 2) myCallback함수에 traing accuracy가 99.9%이상이되면 훈련을 멈추도록 구현한다. 3) Conv2D를 이용한 네트워크를 구성한다. 4) preprocessing.image name space의 ImageDataGenerator를 이용해서.. 2020. 11. 16.
[INTRODUCTION TO TENSORFLOW FOR ARTIFICIAL INTELLIGENCE, MACHINE LEARNING, AND DEEP LEARNING] Improving DNN Performance using Convolutions 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning 과정의 3주차 Enhancing Vision with Convolutional Neural Networks 챕터의 코드 예제입니다. Improving DNN Performance using Convolutions 1) Convolution 2D layer, Max pooling layer를 2개 층을 쌓는다. 2) 마지막에 dense layer를 추가한다. Dense layer만 쓴 것 보다, 정확도가 더 좋아진다. #!/usr/bin/env p.. 2020. 11. 16.
[INTRODUCTION TO TENSORFLOW FOR ARTIFICIAL INTELLIGENCE, MACHINE LEARNING, AND DEEP LEARNING] Implement a Deep Neural Network to recognize handwritten digits 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning 과정의 2주차 Introduction to Computer Vision챕터의 코드 예제입니다. Implement a Deep Neural Network to recognize handwritten digits Handwriting Recognition예제 1) MNIST dataset을 이용해서 모델 학습 2) 각 픽셀의 밝기값을 225로 나눠서 정규화 3) 28x28의 2차원 픽셀 데이터를 1차원으로 flatten하여 모델에 입력되도록 함 4).. 2020. 11. 16.
[INTRODUCTION TO TENSORFLOW FOR ARTIFICIAL INTELLIGENCE, MACHINE LEARNING, AND DEEP LEARNING] Housing Prices 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning 과정의 1주차 A New Programming Paradigm 챕터의 코드 예제입니다. Your First Neural Network 1) ys에 따른 xs 데이터를 준비 2) Dense unit 1개의 뉴럴 네트워크 모델 생성 3) medel.predict로 새로운 y 7.0 에 대응하는 x를 예측한다. #!/usr/bin/env python # coding: utf-8 # In this exercise you'll try to build a .. 2020. 11. 16.
[SEQUENCES, TIME SERIES AND PREDICTION] Real data Sunspots 예측 코세라의 deeplearning.AI tensorflow developer 전문가 자격증 과정내에 Sequences, Time Series and Prediction 과정의 4주차 Real world time series data 챕터의 코드 예제입니다. multi LSTM layer를 사용하여 11년 주기성을 갖는 sunspots 실재 데이터를 traning하여 예측하는 코드 예제입니다. import numpy as np import matplotlib.pyplot as plt def plot_series(time, series, format="-", start=0, end=None): plt.plot(time[start:end], series[start:end], format) plt.xlabel(".. 2020. 11. 12.