shape와 dimension
텐서?란 무엇인가 tensor example in NLP sentence hi John hi James hi Brian 단어 단위로 자른다 unique word index hi 0 John 1 James 2 Brian 3 자연어 처리에서는 원핫인코딩을 기본적으로 사용하니까 아래와 같이 각 단어를 벡터화 시키자 unique word index one hot encoding vector hi 0 [1,0,0,0] john 1 [0,1,0,0] james 2 [0,0,1,0] Brian 3 [0,0,0,1] 이렇게 워드들을 벡터로 표현할 수 있으니까 문장도 당연히 벡터로 표현할 수 있음 sentence vector representation hi John [[1,0,0,0], [0,1,0,0]] hi Jame..
2022. 7. 13.