๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ
-
VSCode์์ ์๋ฒ์ SSH ์๊ฒฉ ์ ์ ์ค์ ํ๊ธฐComputer Science/๊ฐ๋ฐ 2024. 2. 21. 15:09
์ค๋์ ์ฝ๋ ์๋ํฐ VSCode์์ ์๊ฒฉ ์๋ฒ์ ์ฐ๊ฒฐํ์ฌ ์๋ฒ์ ์๋ ์ฝ๋๋ฅผ ์์ ํ๋ ค๊ณ ํ๋ค. ์ค์ ํ๋ ๋ฒ์ ๋งค์ฐ ๊ฐ๋จํ๋ค. ์ฐ์ ์ ์ผ๋ก ํ ์ผ์ VSCode์ extension ์ผ๋ก "Remote-SSH"๋ฅผ ์ค์นํ๋ ๊ฒ์ด๋ค. ๊ทธ ๋ค์ F1 ํค๋ฅผ ๋๋ฌ SSH configuration file์ ์ด์ด์ค๋ค. ๊ทธ๋ฌ๋ฉด ๋ณธ์ธ์ ์ปดํจํฐ์ ์๋ ssh configuration file์ด ๋์ฌํ ๋ฐ ์ด๋ฅผ ์์ ํด์ฃผ๋ฉด ๋๋ค. VSCode๋ก ์๊ฒฉ ์ ์์ ์ฒ์ ํด๋ณธ๋ค๋ฉด ๊ฐ์ฅ ๊ธฐ๋ณธ์ ์ธ ํ์ผ ๋ด์ฉ์ด ๋ค์ด์์ ํ ๋ฐ ์๋ ํญ๋ชฉ๋ค์ ์ง์ ์ถ๊ฐํด์ฃผ๋ฉด ๋๋ค. Host ____ HostName ____ User ____ UseKeychain ____ IdentityFile ~/.ssh/____ port ____ Host: SSH ์ ์์ ํ์๋ ..
-
MacOS atom์ emmet ํจํค์ง ์ค์นํ๊ธฐComputer Science/๊ฐ๋ฐ 2024. 2. 17. 12:58
html ํธ์ง๊ธฐ atom์ ์ค์นํ๋๋ฐ ์ ์ฉํ ๋จ์ถํค๋ฅผ ์ฌ์ฉํ ์ ์๋ emmet์ ์ค์นํ๋ ค๊ณ install packages ์ ๊ฐ๋๋ฐ ํจํค์ง๊ฐ ์กด์ฌํ์ง ์์๋ค. ์ฐพ์๋ณด๋ 22๋ 12์์ ์๋น์ค ์ข ๋ฃ๋ผ๊ณ ํ๋ค. ๊ทธ๋ฐ๋ฐ ํ์ฌ ๋ฃ๊ณ ์๋ ์ํ์ฝ๋ฉ ๊ฐ์์์ ์ฌ์ฉํ๋ ํ๋ก๊ทธ๋จ์ ๋์ผํ๊ฒ ์ฌ์ฉํ๊ณ ์ถ์ด์ emmet์ ๊นํ๋ธ๋ฅผ ์ฐพ์๋ดค๋ค. https://github.com/emmetio/emmet-atom GitHub - emmetio/emmet-atom: Emmet support for Atom Emmet support for Atom. Contribute to emmetio/emmet-atom development by creating an account on GitHub. github.com ์ด ๊นํ ์ฃผ์๋ฅผ ํตํด..
-
๋ถ์ฐ ๋ฐ ๋ณ๋ ฌ ํ์ตAI\ML\DL/Pytorch 2023. 12. 13. 15:27
๋ถ์ฐ ํ์ต(Distributed training)์ ํ์ต ์ํฌ๋ก๋๋ฅผ ์ฌ๋ฌ ์์ ์ ๋ ธ๋์ ๋ถ์ฐ์์ผ ํ๋ จ ์๋์ ๋ชจ๋ธ ์ ํ๋๋ฅผ ํฌ๊ฒ ํฅ์์ํค๋ ๋ชจ๋ธ ํ์ต ํจ๋ฌ๋ค์์ด๋ค. PyTorch์์ ๋ถ์ฐ ํ์ต์ ์ํํ ์ ์๋ ๋ช ๊ฐ์ง ๋ฐฉ๋ฒ์ด ์์ผ๋ฉฐ ๊ฐ ๋ฐฉ๋ฒ์ ์ฌ์ฉ ์ฉ๋๋ณ๋ก ์ฅ์ ์ ๊ฐ์ง๋ค. DistributedDataParallel (DDP) Fully Shared Data Parallel (FSDP) Remote Procedure Call (RPC) distributed traininng Custom Extensions ๋น๋ถ์ฐ ํ์ต์ ๋จ์ผ GPU์์ ๋ชจ๋ธ์ ํ์ต์ํจ๋ค. ํ์ต ๊ณผ์ ์ ๋ค์๊ณผ ๊ฐ๋ค. 1. DataLoader๋ก๋ถํฐ ์ ๋ ฅ ๋ฐฐ์น๋ฅผ ๋ฐ๋๋ค. 2. Forward pass๋ฅผ ํตํด loss ๊ณ์ฐ 3. Backward ..
-
Stochastic differential equation(SDE)AI\ML\DL/Deep learning theory 2023. 12. 5. 14:52
ํ๋ฅ ๋ฏธ๋ถ๋ฐฉ์ ์ (Stochastic differential equation) SDE๋ ์ผ๋ฐ ๋ฏธ๋ถ ๋ฐฉ์ ์๊ณผ ํธ๋ฏธ๋ถ ๋ฐฉ์ ์ ์ฌ์ด์ connection์ ์ ๊ณตํ๋ค. ์ผ๋ฐ ๋ฏธ๋ถ ๋ฐฉ์ ์(ODE)๊ณผ ์ ์ฌํ๋, ํ๋ฅ ์ ์์๋ฅผ ์ถ๊ฐํ์ฌ ๋ ๋ณต์กํ ์์คํ ์ ๋ชจ๋ธ๋งํ๋ ๋ฐ ์ฌ์ฉ๋๋ค. 1) ODE ์ผ๋ฐ๋ฏธ๋ถ๋ฐฉ์ ์์ ๋ณ์์ ๋ณํ๋ฅผ ์๊ฐ์ ๋ํด ์ค๋ช ํ๋ ๋ฐฉ์ ์์ด๋ค. $$ \frac{dx}{dt}=f(x,t)$$ ODE๋ ๋์ผํ ์ด๊ธฐ๋ณ์์ ๋งค๊ฐ๋ณ์ ํ์ ํด๊ฐ ํญ์ ๋์ผํ์ฌ deterministicํ๋ค. randomness ๋ฅผ ๊ณ ๋ คํ์ง ์๊ธฐ ๋๋ฌธ์ด๋ค. 2) SDE ๋ฐ๋ฉด ํ๋ฅ ๋ฏธ๋ถ๋ฐฉ์ ์์ ODE์ ํ๋ฅ ์ฑ ๋๋ ๋ ธ์ด์ฆ๋ฅผ ํตํฉํ์ฌ ๋ถํ์ค์ฑ์ ๊ฐ์ง ์์คํ ์ ๋ชจ๋ธ๋งํ๋ค. $$ dx=f(x,t)dt+g(x,t)\cdot dB(t)$$ ์ด๋ $B..
-
No module named 'jupyter_core'Computer Science/๊ฐ๋ฐ 2023. 12. 4. 14:16
anaconda ํ๊ฒฝ์์ jupyter notebook ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ์ ๋ ์๋์ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ด๋ค. from jupyter_core.command import main ModuleNotFoundError: No module named 'jupyter_core' ํด๊ฒฐ ๋ฐฉ๋ฒ pip3 install --upgrade notebook pip3 install lesscpy
-
torch.cumprod() w.r.t. diffusion noise schedulingAI\ML\DL/Pytorch 2023. 12. 3. 19:25
[cumprod: cumulative product ํจ์] torch.cumprod ํจ์๋ PyTorch ์์ ์ ๊ณตํ๋ ํจ์๋ก, ํ ์์ ๋์ ๊ณฑ์ ์์๋ณ๋ก(element-wise) ๊ณ์ฐํด์ค๋ค. ์ฌ์ฉ๋ฒ์ ๋ค์๊ณผ ๊ฐ๋ค. import torch tensor = torch.tensor([1, 2, 3, 4]) cumprod_result = torch.cumprod(tensor, dim=0) print(cumprod_result) tensor([ 1, 2, 6, 24]) ์๋ฅผ ๋ค์ด, 'torch.tensor([1,2,3,4])' ํ ์์ ๋ํด torch.cumprod ํจ์๋ฅผ dim=0 (์ฒซ๋ฒ์งธ ์ฐจ์)์ผ๋ก ์ ์ฉํ๋ฉด, ์ด ํจ์๋ ๊ฐ ์์์ ๋์ ๊ณฑ์ ๊ณ์ฐํ์ฌ [1,2,6,24] ๋ฅผ ๋ฐํํ๋ค. 1 1x2=2 1x2x3=6..
-
[Linux] miniconda3 - conda command not working (tqdm)Computer Science/๊ฐ๋ฐ 2023. 12. 1. 21:31
์ด๋๋ ์๋ฒ์ ์ ์ํ๋๋ฐ conda env list, conda, conda activate ๋ค ์๋จนํ๊ณ ๊ฐ์๊ธฐ tqdm ์ด ์๋ค๋ ๋ชจ๋ ์๋ฌ๊ฐ ๋ด๋ค. ๊ฐ์๊ธฐ conda ๋ช ๋ น์ด๋ก ๋ฌด์๋ ํ ์๊ฐ ์์๋ค... ์ ์ด๋ฐ์ผ์ด ๋ฐ์ํ์๊น ๋งจ ์์ค์์ ์คํ๋๋ sys.exit(main()) ํ์ผ์ด ์คํ๋๋ ํ์ด์ฌ ๋ฒ์ ์ด 3.10 ์ธ๊ฒ์ผ๋ก ๋ณด์ธ๋ค. ํ์ด์ฌ 3.10 ์ tqdm ์ด ๊น๋ฆฌ์ง ์์๋ค๋ ๋ง์ด๊ฒ ์ง ํ์ฌ ํ๊ฒฝ์์ ์คํ๋๋ ํ์ด์ฌ ๋ฒ์ ๊ณผ ์ค์น๋ ๊ฒฝ๋ก๋ฅผ ํ์ธํด๋ดค๋ค. ์ด์ํ๊ฒ๋ ํ์ฌ ์คํ๋๋ ํ์ด์ฌ ๋ฒ์ ์ /usr/bin/python ์ ์๋ python 3.8.10 ์ด์๋ค. ํ .. ์ด๋ป๊ฒ ํด๊ฒฐํด์ผํ์ง?! ํด๊ฒฐํ๋ค!!! ๋๊ฒ ์ฌ๊ฐํ ๋ฌธ์ ์ธ ์ค ์์๋๋ฐ ๊ทธ๋ฅ ๋ง๊ทธ๋๋ก miniconda3 ๊ฐ ์คํํ๋ python3.1..
-
๊ฐ์ํ๊ฒฝ ์ด๊ธฐ ์ค์ , ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น (conda)Computer Science/๊ฐ๋ฐ 2023. 11. 29. 13:59
ํ๋ก์ ํธ๋ง๋ค ๊ฐ์ํ๊ฒฝ์ ์๋ก ํ์ ๊ตฌ์ฑ์ ํ ๋ ๋ฐ๋ณต๋๋ ์์ ์ด ๋ง์๋ฐ ์ด๋ฅผ ์ ๋ฆฌํด๋ณด๋ ค๊ณ ํ๋ค. ์ฐ์ ๋์ ๊ฐ๋ฐ ํ๊ฒฝ์ ์ด๋ ๋ค. OS: Linux Ubuntu 20.04.05 LTS Kernel: Linux 5.15.0-79-generic Architecture: x86-64 1) ๊ฐ์ํ๊ฒฝ ์์ฑ, ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น - ํ์ด์ฌ ๋ฒ์ : 3.6 - pytorch ๋ฒ์ : 1.7 conda create -n pytorch1.7 python=3.6 conda activate pytorch1.7 conda install anaconda conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10.2 -c pytorch pip insta..