전체 글
-
-
-
자료구조 - 시간복잡도자료구조 2024. 9. 13. 21:22
시간복잡도 는 (시간이 얼마나 걸리냐) 알고리즘을 평가하는 척도중 하나입니다.입력값(n)과 연산수행시간의 상관관계를 나타내는 척도를 시간복잡도라고 합니다. 연산수행시간은 사용하는 프로그램 언어마다 컴퓨터마다 다르기 때문에 (애매해져서)(ex. 똑같은 알고리즘이라도 슈퍼컴퓨터는 빠르고, 느린컴퓨터는 느려서)연산횟수를 기준으로 시간복잡도를 계산합니다 공간 복잡도 (계산하기 애매해서 계산잘안함)프로그램 실행에 얼마나 많은 메모리를 나타낸다. 피보나치 수열알고리즘 1번 : 계산할때마다 기록함(메로리사용)알고리즘 2번: 계산하고 기록안함(메모리 사용안함) O notation - 시간복잡도와 관련 N개의 데이터데이터의 개수에 따라 실행되는 연산의 양알고리즘을 어떻게 짜느냐에 따라
-
RNN (Recurrent Neural Network) 순환신경망인공 지능 개념 2024. 9. 9. 22:58
RNN = Sequence model (순서정보반영) RNN - 연속적인 데이터순서정보를 기억해서 순서대로 처리한다. one to many many to one many to many ( 번역기) ================바닐라 RNN 문제점 - 정보가 손실된다장기 의존성 문제순서대로 진행될때 맨앞에보다 나중에 갔을때 맨앞정보를 반영 못한다. 장기의존성 장기 의존성(Long-term dependencies)은 모델, 시스템 또는 알고리즘이 입력 시퀀스의 초반부에서 중요한 정보를 시간적 또는 맥락적으로 먼 거리까지 기억하고 활용하는 능력을 말합니다. 이는 여러 머신러닝 및 자연어 처리(NLP) 작업에서 매우 중요한 개념으로, 특히 문장이나 문서 내에서 멀리 떨어진 단어들이나 개념들 간의 ..
-
경사하강법카테고리 없음 2024. 9. 8. 10:15
출처: 딥러닝·인공지능 Signature 초격차 패키지 Online. •현재 a, b 위치에서 L을 줄이는 방향으로 나아가자•Gradient는 항상 가장 가파른 방향을 향한다..! (x2 으로 확인)왜 가장 가파른 방향? proof) 1-3강.•그럼 그냥 반대 방향으로 가면 되겠네! 그라디언트 - 편미분을 벡터로 쌓은것 - 그라디언트는 항상 가파른 방향으로 향한다.그래서 반대방향으로 가야 loss가 적어진다.오른쪽 벡터로 편미분값을 묶은것이 yx^2의 그라디언트 x가 1일때 미분한값은 2x니까 2니까 x가 1일때 가장가파른 방향이니 반대방향은 -2 1과 -1을 계속 왔다갔다함 - > 그라디언트 크기를 고려를 안해준것임 -> 생각보다 미분값이 크다는겂그래서 러닝 레이트를 곱해줌x값이 1일때 x..
-
CNN인공 지능 개념 2024. 9. 7. 20:32
이미지를 일자로 핀다. 그러나 이미지의 공간정보를 손실한다. 아래그림)RED, GREEN, BLUE 3개채널 - red, green, blue 아래그림) 합성곱연산(covolution operation) 입력을 kernal 로 operation을 하면 출력이 항상 작아진다. 기존의 operation과 다르게 CNN은 convolution operation으로 featuremap 을 추출한다. 기존의 레이어의 가중치가 CNN에서는 kernel이 가중치가 된다. kernal 연산한다음 편향(bias)를 더해준다. 중요~) feature map 크기 계산법 4x4 3x3x3(채널) = 3x3x3(커널) input과 kernal의 channel수만 같다. kernal을 통해 convolut..
-
Optimizer인공 지능 개념 2024. 9. 7. 19:37
1. 모멘텀(Momentum)관성을 사용해서 local minimum을 극복한다. tf.keras.optimizers.SGD(lr=0.01, momentum=0.9)optimizer는 stochastic gradient descent 2. 아다 그라드(Adagrad)변화가 많은 가중치의 러닝레이트를 올린다. 빠르게 학습시켜주기 위함epsilon을 사용 3. 알엠에스프롭(RMS prop)아다그라드는 시간이 지나면 학습률이 많이 낮아지는 문제점을 극복하기 위한법이 RMS prop 4. Adam(RMSprop + 모멘텀)