GAN
-
Tensorflow Generative Adversarial Network 예시 코드(GAN, MNIST Data Set)Data Science/Tensorflow 2022. 11. 1. 01:19
1. 기본 세팅 1.1 라이브러리 import os import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import tensorflow_datasets as tfds from tensorflow.keras import Model, layers 1.2 GPU 세팅 os.environ["CUDA_VISIBLE_DEVICES"]="0" gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: tf.config.experimental.set_memory_growth(gpus[0], True) except RuntimeError as e: print(e) # ..
-
AutoEncoder 개념 및 종류Data Science/ML&DL 모델 2022. 10. 31. 00:12
1. AutoEncoder(오토인코더) 개념 AutoEncoder는 입력된 데이터를 압축시킨 후 다시 원본과 유사하게 복구하는 모델이다. 크게 Encoder, Decoder, Latent Representation으로 이루어져있다. Encoder는 입력된 데이터를 Latent Representation으로 압축시킨다. 이때 Latent Representation의 dimension(차원)은 입력데이터보다 작다. Decoder는 Latent Representation으로 압축된 데이터를 다시 원본 데이터 사이즈로 복구한다. 이때 우리의 목적은 Dimensionality Reduction이다. 아래 그림을 통해서 더 자세히 설명한다. 28*28 이미지를 Flatten하여 784 길이의 벡터로 만들어 입력값으..