์•ˆ๋…•ํ•˜์„ธ์š”. 

 

๋งŒ์•ฝ ์—ฌ๊ธฐ๊นŒ์ง€ ๋”ฐ๋ผ ์˜ค์…จ๋‹ค๋ฉด 90% ์ •๋„ ์„ฑ๊ณต์ž…๋‹ˆ๋‹ค. ๋‚˜๋จธ์ง€ 10%๋Š” Pytorch๋งŒ ์„ค์น˜ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๊ต‰์žฅํžˆ ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. 

 

์•„๋ž˜ Pytorch ๊ณต์‹ ์‚ฌ์ดํŠธ๋ฅผ ๋“ค์–ด ๊ฐ‘๋‹ˆ๋‹ค. 

https://pytorch.org/

 

PyTorch

An open source machine learning framework that accelerates the path from research prototyping to production deployment.

pytorch.org

์•„๋ž˜๋กœ ์ญ‰ ๋‚ด๋ฆฌ์‹œ๋ฉด,

์œ„ ์‚ฌ์ง„์ฒ˜๋Ÿผ ์žˆ์Šต๋‹ˆ๋‹ค. 

 

๊ทธ๋Ÿฐ๋ฐ Run this Command๋ฅผ ๊ทธ๋Œ€๋กœ ๋ณต๋ถ™ํ•ด์„œ ์„ค์น˜ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. 

 

Pytorch : 1.9

OS : Window10

Package : Anaconda

Language : Python

Compute Platform : CUDA 10.2

 

์™œ CUDA ์ตœ์‹  ๋ฒ„์ „์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ , CUDA 10.2๋กœ ์‚ฌ์šฉํ•˜๋Š”์ง€ ์˜๋ฌธ์ด ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 

 

CUDA 11.1์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ CUDA TOOLKIT์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. CUDA TOOLKIT์„ ์„ค์น˜ํ•˜๊ณ  ๊ฒฝ๋กœ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ด ๊ต‰์žฅํžˆ ๊ท€์ฐฎ์€ ์ผ์ด๊ธฐ ๋•Œ๋ฌธ์—, CUDA 10.2๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด TOOLKIT์„ ์„ค์น˜ํ•˜์ง€ ์•Š๊ณ  ๋ฐ”๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

import torch

# torch version
torch.__version__
#  1.9

#  Returns a bool indicating if CUDA is currently available.
torch.cuda.is_available()
#  True
 
#  Returns the index of a currently selected device.
torch.cuda.current_device()
#  0
 
#  Returns the number of GPUs available.
torch.cuda.device_count()
#  1
 
#  Gets the name of a device.
torch.cuda.get_device_name(0)
#  NVIDIA GeForce RTX 2060 SUPER
 
#  Context-manager that changes the selected device.
#  device (torch.device or int) โ€“ device index to select. 
torch.cuda.device(0)

 

 

Pytorch GPU๊ฐ€ ์ค€๋น„ ๋˜์—ˆ์œผ๋‹ˆ, ์ „์— ๋งŒ๋“ค์–ด ๋‘” Se-ResNet์„ ์ด์šฉํ•˜์—ฌ CIFAR-10 ๋ฐ์ดํ„ฐ ์…‹์„ ๋ถ„๋ฅ˜ํ–ˆ์Šต๋‹ˆ๋‹ค.

๊ฐ„๋‹จํžˆ epoch 200๋ฒˆ ์ •๋„ ๋Œ๋ ค ๋ดค๋Š”๋ฐ ๊ดœ์ฐฎ์€ ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜์˜จ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. 

 

์ด์ œ ์•ผ์™ธ์—์„œ๋„ ๋”ฅ๋Ÿฌ๋‹์„ ๋Œ๋ ค์•ผํ•  ๋•Œ, ๋ฐ”๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ( ํ•ด์ปคํ†ค ๊ฐ™์€ ๊ฒฝ์šฐ ...? )

 

https://coding-yoon.tistory.com/152

 

์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ๊ฐœ์ธ ๋”ฅ๋Ÿฌ๋‹ ์„œ๋ฒ„ ๋งŒ๋“ค๊ธฐ ! (1) with Window10, Pytorch

์ด๋ฒˆ์— ์ปดํ“จํ„ฐ๋ฅผ ๋งž์ถ”๋ฉด์„œ ๊ทธ๋ž˜ํ”ฝ์นด๋“œ RTX 2060 super๋ฅผ ๊ตฌ๋งคํ–ˆ์Šต๋‹ˆ๋‹ค. ์ €๋งŒ์˜ ๋”ฅ๋Ÿฌ๋‹ ์„œ๋ฒ„๋ฅผ ๋งŒ๋“ค์–ด ๋†“์œผ๋ฉด ์–ด๋””์„œ๋“  ์•ผ์™ธ์—์„œ ๋…ธํŠธ๋ถ์œผ๋กœ ๊ฐ€๋ณ๊ฒŒ ์ž‘์—…ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ( ์–ผ๋งˆ๋‚˜ ์ž‘์—…์„ ํ• ์ง€ ๋ชจ๋ฅด

coding-yoon.tistory.com

https://coding-yoon.tistory.com/153

 

์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ๊ฐœ์ธ ๋”ฅ๋Ÿฌ๋‹ ์„œ๋ฒ„ ๋งŒ๋“ค๊ธฐ ! (2) with Window10, Pytorch

์•ˆ๋…•ํ•˜์„ธ์š”. ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ ๊ฐœ์ธ ๋”ฅ๋Ÿฌ๋‹ ์„œ๋ฒ„ ๋งŒ๋“ค๊ธฐ 2ํŽธ์ž…๋‹ˆ๋‹ค. ์ด๋ฒˆ ๊ธ€์€ ์ฃผํ”ผํ„ฐ ๋…ธํŠธ๋ถ์„ ์ข€ ๋” ์œ ์šฉํ•˜๊ณ  ๋ณด๊ธฐ ์ข‹๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํŽธ์ž…๋‹ˆ๋‹ค. ๊ตณ์ด ์•ˆ ํ•˜์‹œ๊ณ  ๋„˜์–ด๊ฐ€์…”๋„ ๋ฌด๋ฐฉํ•ฉ๋‹ˆ๋‹ค. ~ 1. ์ฃผํ”ผ

coding-yoon.tistory.com

 

728x90
๋ฐ˜์‘ํ˜•
18์ง„์ˆ˜