본문 바로가기

DL12

[Lotte] Metric Learning & Few shot Learning Metric Learning Metric Learning - Similarity link Metric learning is the task of learning a distance function over objects. 객체들 사이의 distance를 학습하는 task What " distance function" is? A metric or distance function has to obey four axioms(명제): non-negativity, identity of indiscernibles, symmetry and subadditivity (or the triangle inequality). Some well-known approaches for metric learning include L.. 2021. 3. 21.
[Python] change even & odd element in 2d list list comprehension과 map 둘다 같은 결과로 나온다 아무거나 편한대로 사용하면 될듯 코드 길이는 차이가 별로 안난다. a = [[1,2,1,2],[3,4,3,4]] print(a) odd_list = [[k*10 for k in x[::2]] for x in a] even_list = [[k*20 for k in x[1::2]] for x in a] print(odd_list) print(even_list) print() map(lambda x: x ** 2, range(5)) odd_list = [list(map(lambda x:x*10, x[::2])) for x in a] even_list = [list(map(lambda x:x*20, x[1::2])) for x in a] pri.. 2021. 3. 10.
[OpenCV] cv2.addWeighted - Image Overlay cv2를 사용해서 여러 이미지를 overlay 하고 싶어서 찾다가 발견한 자료 background = cv2.imread(img_list[0]) overlay = cv2.imread(img_list[1]) added_image = cv2.addWeighted(background,0.5,overlay,0.5,0) plt.imshow(added_image); deep-learning-study.tistory.com/115 2021. 3. 9.
[Github] Github CLI: issue create and close command line으로 issue number 를 사용해서 close and resolve 등등은 가능한거 같은데 issue create은 cli를 따로 사용해야 되는거 같다. github cli 설치 sudo snap install gh 설치 후 To authecticate gh auth login 하면 몇가지 procedure가 존재하는데 What account do you want to log into? -> Github.com What is your preferred protocol for Git operations? -> HTTPS (관련링크: gist.github.com/grawity/4392747) Authenticate Git with your GitHub credentials? -> .. 2021. 3. 9.
[Pytorch] Multi-label classification Loss Selection discuss.pytorch.org/t/is-there-an-example-for-multi-class-multilabel-classification-in-pytorch/53579/9 Is there an example for multi class multilabel classification in Pytorch? nn.CrossEntropyLoss uses the target to index the logits in your model’s output. Thus it is suitable for multi-class classification use cases (only one valid class in the target). nn.BCEWithLogitsLoss on the other hand tre.. 2021. 2. 22.
[딥러닝을 이용한 자연어 처리-조경현] Basic Machine Learning: Supervised Learning Probability 에서 가장 중요한 property 2가지 1. Non-negative: $p(X - e_{i}) \geqq 0$ (특정 event 가 일어날 확률은 0보다 크거나 같다) 2. Unit volume: $ \sum_{e \in \Omega} p(X=e) = 1 $ ( 전체 확률을 모두 더한 값은 1 ) 위에서 언급한 확률에서 중요한 2가지 특징을 사용해서 NN에서 예측값으로 사용하기 위해서 Supervised Learning에서 input이 directed acyclic graph를 통과하고 나온 결과가 답을 준다라고 한다. 이것을 input이 주어졌을 때 ouput이 $y'$에 대한 확률이 무었이냐 로 방향을 전환해서 NN을 사용해서 예측하기 위함. 여러 ouput이 존재했을 때 어떤.. 2021. 2. 16.
[Git repo] from "git clone" to "merge" IF not invited to the repo, Fork repo, then dev. If invited, clone it and do it. - make branch by clicking git button (branch: albu) - doing dev ldf0234130941asdfahk!$)!@#@ - "git status": to check changes in several files. - "git add Sleep/main.py": to stage for commit ( one file at a time ) - "git commit -m 'I changed this just for fun' " ( one file at a time ) - "git remote -v": to check at w.. 2021. 1. 31.
Pytorch Dataset - cv2.imread 메모리 사용 imread 라는 것이 메모리를 어느 정도 차지함.(어느정도?) 메모리 충분 ==> init 메서드에 imgs 리스트 생성해서 mread로 미리 읽어놔서 빠른속도로 로딩(대신 메모리 사용량 증가) 후 getitem 메서드에서 나머지 augmentation 진행 메모리 부족 ==> getitem에서 이미지를 하나씩 imread로 읽어서 augmentation 적용 2021. 1. 31.
[PUBG] ML_baseline(lightgbm) Summary from outlier¶ headshotrate > 0.5 damagedealt >= 4000 kills > 60 killstreak > 10 walkdistance > 7.5k weaponacquired > 20 heals > 40 boosts > 20 totaldistance == 0 & kills > 0 walkdistance == 0 & kills > 0 ridedistance == 0 & roadkills > 0 weaponacquired == 0 & winplaceperc > 0.5 heals == 0 & winplaceperc > 0.8 heals and boosts == 0 & winplaceperc > 0.8 one NaN in target value In [2]: impo.. 2020. 6. 2.