일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- TensorFlow
- linux
- Windows10
- 딥러닝
- Windows 10
- 알고리즘
- 영상처리
- 백준
- 학습
- python
- 리눅스
- 운영체제
- 프로그래밍
- 회귀
- OpenCV
- 공부
- C++
- 프로세스
- error
- C언어
- 백준알고리즘
- 코딩
- 시스템프로그래밍
- 텐서플로우
- 턱걸이
- CV
- Computer Vision
- shell
- c
- 쉘
- Today
- Total
목록keras (3)
줘이리의 인생적기

데이터 증식(Data Augmentation)이라는 단어를 들어보셨나요? 데이터 증식 즉, 이미지 보강을 통해 가지고 있는 데이터를 새롭게 훈련 데이터에 보강하는 것으로 정확도를 개선해볼 수 있습니다. 기존 훈련데이터를 회전시키거나, 기울이거나, 확대하거나, 평행 이동시키거나, 뒤집어서 다양한 이미지를 만들어낼 수 있습니다. tf.keras에 있는 ImageDataGenerator를 통해 쉽게 이미지 보강 작업을 할 수 있습니다. import tensorflow as tf import matplotlib.pyplot as plt from tensorflow.keras.preprocessing.image import ImageDataGenerator import numpy as np fashion_mnis..

이제 또 다른 다항분류 Fashion MNIST를 공부해보겠습니다. MNIST란 손으로 쓴 숫자들로 이루어진 대형 데이터베이스이며, 머신러닝의 고전적인 문제입니다 이 영향을 받아 만들어진 Fashion MNIST는 옷, 신발, 가방의 이미지 데이터베이스입니다. Fashion MNIST의 특징은 그레이스케일 이미지이며, 10개의 범주, 28 * 28 크기의 픽셀을 가지고 있다는 점입니다. Fashion MNIST 데이터셋은 tf.keras에 탑재되어 있으니 바로 시작해보겠습니다. 데이터를 먼저 불러오고, 정규화를 한 다음 첫 번째 데이터를 먼저 확인해보겠습니다. import tensorflow as tf fashion_mnist = tf.keras.datasets.fashion_mnist (train_X,..

그래프와 어느정도 친해졌으니 앞서 배운 XOR 학습 시킬 때 잘 되고 있는지 시각화 해보겠습니다. import tensorflow as tf import math import numpy as np import matplotlib.pyplot as plt x = np.array([[1,1], [1,0], [0,1], [0,0]]) y = np.array([[0], [1], [1], [0]]) model = tf.keras.Sequential([tf.keras.layers.Dense(units=2, activation='sigmoid', input_shape=(2,)), tf.keras.layers.Dense(units=1, activation='sigmoid')]) model.compile(optimize..