전체 글
-
로지스틱 Lost function인공 지능 개념 2024. 8. 27. 18:46
합격이나 불합격이나 구분- 이진분류이진 분류통 or 분류스팸 or not 스팸둘중하나를 선택하기 위한것 -> 실제값 0과 1중하나 로지스틱 회귀 이진분류를 할때 사용하는 회귀 방법으로 확률값을 통해 분류하는 방법이다. 어떻게 -> 크로스엔트로피를 활용하여 실제값과 예측값의차이(loss)를 줄여서 정답에 가깝게 하는방법 로지스틱 회귀이진분류를 해야하는 상황에서 정답에 가까운 확률로 예측값을 구하는방법크로스엔트로피 방법시그모이드로 확률로 예측값을 표현하고, 그예측값을 크로스 엔트로피로 loss값을 구한다.크로스엔트로피 사용이유시그모이드 함수에서 확률로 나오기 때문에 log함수를 이용해서 loss값을 표현해준다. 아래그림) 크로스엔트로피크로스엔트로피는 cost function을 만들기 위한..
-
역전파 backpropagation인공 지능 개념 2024. 8. 25. 15:15
경사하강법접선의 기울기 값을 따라서 하강해나간다. θn 새로운 것을 구할때, 기존 θ는 θn-1 이고 기존에 기울기 ((θn-1)의 미분값)이 -5일때 알파값 -2를 곱하면 θn-1 기존값인 -4에서 오른쪽으로 간다. 알파(러닝레이트 - 얼마나 움직일지) 기울기가 특정 θ에서 0이면 그 θ값으로 수렴한다.(수렴= 같은값이 계속나옴) LOSS FUNCTION에 최소값을 찾은것최소값을 만드는 파라미터를 찾음2차함수는 LOSS FUNCTION예측함수에 맞는 예측함수를 평가하기 위해만든 로스함수예측함수에 맞는 최고의 파라미터
-
07_question-answering_v2.ipynbtransformer 2024. 8. 16. 15:51
sequence classification text classification [0.8, 0.2] -> 확률분포 [31.2, 21.7] ->logit 하나의 위치(CLS) token에서만 logit vector를 뽑음 head [representation vector, context vector] [ ] [ ] [ ] [ ] [ ] 1 2 3 4 5 [CLS] i love this soup ..... representation vector : 문장의 의미를 전부담고있는 vector context vector :문장의 의미를 전부담고있는 vector [CLS] token을 ..
-
06_summarization.ipynbtransformer 2024. 8. 7. 16:09
출처 https://product.kyobobook.co.kr/detail/S000200330771 트랜스포머를 활용한 자연어 처리 | 루이스 턴스톨 - 교보문고트랜스포머를 활용한 자연어 처리 | 챗GPT처럼 자연어를 찰떡같이 알아듣는 트랜스포머 완벽 해부트랜스포머는 우리 주변에 가득하다! 트랜스포머 아키텍처는 순식간에 자연어 처리 분야를 지product.kyobobook.co.kr아래그림 설명출처: [NLP] N-gram 언어 모델의 개념, 종류, 한계점📚 목차 1. N-gram 개념 2. N-gram 등장 배경 3. N-gram 종류 4. N-gram 기반 단어 예측 5. N-gram의 한계점 1. N-gram 개념 언어 모델(Language Model)은 문장 내 앞서 등장한 단어를 기반으로 이어..
-
05_text-generation.ipynbtransformer 2024. 7. 31. 16:41
출처 https://product.kyobobook.co.kr/detail/S000200330771 트랜스포머를 활용한 자연어 처리 | 루이스 턴스톨 - 교보문고트랜스포머를 활용한 자연어 처리 | 챗GPT처럼 자연어를 찰떡같이 알아듣는 트랜스포머 완벽 해부트랜스포머는 우리 주변에 가득하다! 트랜스포머 아키텍처는 순식간에 자연어 처리 분야를 지product.kyobobook.co.kr 아래그림) causal launguage model앞에 단어를 모두 보고 그다음 단어를 맞추는 방법( 그 확률값들을 구해서 다 곱해주는것) 출처https://chloamme.github.io/2021/12/08/illustrated-gpt2-korean.html [번역] 그림으로 설명하는 GPT-2 (Transformer..
-
[요약] MSE & 선형회귀 Linear regression인공 지능 개념 2024. 7. 31. 12:28
https://velog.io/@supremo7/%EB%A8%B8%EC%8B%A0-%EB%9F%AC%EB%8B%9D-%EC%84%A0%ED%98%95-%ED%9A%8C%EA%B7%80Linear-Regression [머신 러닝] 선형 회귀(Linear Regression)선형 회귀 집의 크기로 집의 값을 예측하는 경우를 생각해봅시다. 선형 회귀는 데이터에 가장 적절한 하나의 선을 찾아냅니다. 이 선을 최적선이라 합니다. 이 선을 통해 새로운 집의 크기에 대velog.io--> 이 식에 대해 설명해오기 경사하강법loss함수(1차함수던지 2차함수인지)에서 경사하강법을 사용한다.예) 당뇨일때 혈당가중치를 올려야 loss가 줄여짐 아래그림) 빨간직선이 평수에 따른 예상금액 파란점이 ..
-
[요약]인공신경망 요약인공 지능 개념 2024. 7. 31. 11:49
인공신경망 ANN Artificial neural network 노드(unit) 또는 에지(connection)으로 이루어져있다. 웨이트를 곱하고 바이어스(민감도)와 함께 더하고, 엑티베이션 여러가지 엑티베이션이 존재 주어진 입력에 대해 원하는 출력이 나오도록 웨이트, 바이어스를 ai가 알아내는것 -> AI가 학습을 한다 AI가 스스로 적절한 웨이트, 바이어스를 알아내기때문에 대박 곱하고 더하고 activation의 반복 모든 노드들이 연결되 있는 신경망 multi layer perception perception은 unit step function을 활성화 함수로 사용하는 인공신경의미 MPL는 임의의 활성화 함수를 사용하는 인공신경망 hidden layer 앞이나 뒤에서 안보여서 input lay..