목록전체 글 (295)
UOMOP
1. 각종 모듈 호출 import numpy as np import tensorflow as tf from tensorflow.keras.datasets import cifar10 from tensorflow.keras.utils import to_categorical from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt from tensorflow.keras.models import Model, Sequential from tensorflow.keras.layers import Input, Conv2D, Activation, MaxPooling2D, Flatten, Dense, Dropout,\ Batch..
1. 각종 모듈 호출 import numpy as np from tensorflow.keras.datasets import cifar10 from tensorflow.keras.utils import to_categorical from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt from tensorflow.keras.models import Model, Sequential from tensorflow.keras.layers import Input, Conv2D, Activation, MaxPooling2D, Flatten, Dense,\ Dropout, BatchNormalization from tenso..
import numpy as np import matplotlib.pyplot as plt from tensorflow.keras.datasets import cifar10 from tensorflow.keras.models import Model, Sequential from tensorflow.keras.layers import Input, Conv2D, Activation, MaxPooling2D, Flatten, Dense, Dropout, BatchNormalization from tensorflow.keras.optimizers import Adam, RMSprop # label 번호 순으로 target값 나열해주기 NAMES = np.array(["airplane", "automobile",..
from tensorflow.keras.layers import Input, Conv2D from tensorflow.keras.models import Model input_tensor = Input(shape = (5, 5, 1)) x = Conv2D(filters = 1, kernel_size = (3, 3), strides = 1)(input_tensor) print("x's shape : {}".format(x.shape)) from tensorflow.keras.layers import Input, Conv2D, ZeroPadding2D from tensorflow.keras.models import Model input_tensor = Input(shape = (6, 6, 1)) padded..
## CNN 모델을 생성해보자 import numpy as np import pandas as pd import os from tensorflow.keras.layers import Input, Dense, Flatten, Conv2D, MaxPooling2D from tensorflow.keras.models import Model input_tensor = Input(shape = (14, 14, 1)) x = Conv2D(filters = 4, kernel_size = 3, strides = 1, padding = "same", activation = "relu") (input_tensor) x = Conv2D(filters = 6, kernel_size = 3, activation = "relu"..
module 호출 함수 생성 데이터 불러오기 0~1 함수 적용 one hot encoding 학습/검증/테스트 데이터 분리 모델 생성 모델 설정 모델 학습 학습/검증 셋으로 성능 비교 테스트 셋을 통한 성능 확인 1. module 호출 import matplotlib.pyplot as plt import numpy as np from sklearn.model_selection import train_test_split from tensorflow.keras.utils import to_categorical from tensorflow.keras.layers import Input, Flatten, Dense from tensorflow.keras.models import Model from tensorf..