[Coursera] DeepLearning.AI TensorFlow Developer ( Tensorflow In Practice ) 강의 정리
Course 1 : Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning
- Week 1 - A New Programming Paradigm
- Week 2 - Introduction to Computer Vision
- Week 3 - Enhancing Vision with Convolutional Neural Networks
- Week 4 - Using Real-world Images
Course 2 : Convolutional Neural Networks in TensorFlow
Course 3 : Natural Language Processing in TensorFlow
Course 4 : Sequences, Time Series and Prediction
Week 2 - Introduction to Computer Vision
An Introduction to computer vision
Fashion MNIST dataset
- 70k Images
70,000개 이미지 - 10 Categories
10가지 의류 - Images are 28x28
28 x 28 픽셀 : 각 픽셀은 0 - 255 표현 - Can train a neural net!
Writing code to load training data
1 | |
- 총 70,000개 이미지
- train - 60,000개
- test - 10,000개
| 레이블 | 클래스 |
|---|---|
| 0 | T-shirt/top |
| 1 | Trouser |
| 2 | Pullover |
| 3 | Dress |
| 4 | Coat |
| 5 | Sandal |
| 6 | Shirt |
| 7 | Sneaker |
| 8 | Bag |
| 9 | Ankle boot |
https://www.tensorflow.org/tutorials/keras/classification
Coding a Computer Vision Neural Network
CNN 모델링 준비
1 | |
첫번째 레이어
tf.keras.layers.Flatten(input_shape=(28, 28))
이미지가 28 x 28이므로, input shape는 28x28 flatten layer이다.
마지막 레이어
10개 뉴런이 있는 이유는 데이터 셋에 10가지 종류 의류가 있기 때문이다.
Walk through a Notebook for computer vision
이미지는 0 ~ 255 사이 값으로 표현된다.
모든 값을 0 ~ 1 변경하기 위해 255로 나눈다.
1 | |
Using Callbacks to control training
Callback은 사용자가 지정한 시점에서 학습을 취소 할 수 있다.
1 | |
예를 들어, 학습 중 Loss가 0.4미만이면 학습을 취소한다.
Walk through a notebook with Callbacks
전체 코드
1 | |
callbacks 사용보다는 끝까지 기다리는 것을 추천!
https://www.coursera.org/professional-certificates/tensorflow-in-practice