파이썬 딥러닝 ai 스쿨 기초/lecture03 3

lecture03 2교시 인공지능 텐서플로우 실습 필기체 인식기2

import tensorflow as tf import random import time import os from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True, validation_size=5000) #5000개 지정 #input output 이름(name) X Y 지정, 불러오기 편함 X = tf.placeholder(tf.float32, [None, 784], name="X") Y = tf.placeholder(tf.float32, [None, 10], name="Y") keep_prob = tf.placeholder(tf.float32,..

lecture03 1교시 개념정리

Overfitting train error는 계속 낮아지지만 특정 시점(overfitting, 과적합)부터 테스트 셋의 error가 증폭함 Overfitting을 막기위한 방법 Early Stopping 갱신된 최고점만 저장함 Dropout Ensemble은 n개의 모델을 학습, 종합 판단 시간 자원 소모 큼 Dropout은 random하게 뉴런을 꺼 다양한 모델을 학습시킨 효과를 냄 (뉴런 살릴 확률 0.5) Weight decay, Weight restriction 자유도가 높으면 overfitting 쉬움 Orthogonality 멀티태스크 러닝, 유사성이 있는 다른 두가지 태스크를 동시에 진행함 ex) 영화리뷰, 상품리뷰 를 동시에 진행하여 공통 데이터로 성능 증가 Knowledge distill..

lecture03 0교시 파이썬 기초 연습문제

튜플 t1 = (1, 2, 3) #괄호로 선언 print(t1) print(len(t1)) print(t1[0]) print(t1[:2]) #튜플은 del t1[0], t1[0] = 4 등의 데이터 수정 지원 안함 t2 = (4,) print(t2) print(t1*3) print(t1 + t2) (1, 2, 3) 3 1 (1, 2) (4,) (1, 2, 3, 1, 2, 3, 1, 2, 3) (1, 2, 3, 4) 파일 입출력 #w 쓰기 f = open("./write.txt",'w',encoding='utf-8') f.write("file write") f.close() f = open("./write.txt",'w',encoding='utf-8') for i in range(1, 10): data =..