SlideShare a Scribd company logo
1 of 53
Download to read offline
Touch to PyTorch
ISL Lab Seminar
Hansol Kang
: From basic to vanilla GAN
Contents
October 9, 2018
Setup
Install
Development Tools Example
What is PyTorch?
PyTorch
Deep Learning Framework
Tensor
Datasets
Neural Nets
Learning
Applications
What is PyTorch?
October 9, 2018
2
an open source machine learning library for Python.
It is primarily developed by Facebook's artificial-intelligence research group.
• PyTorch
Vs.
What is PyTorch?
October 9, 2018
3
Written in : Python
Interface : PythonNov. 2010
Written in : C++
Interface : Python, MATLAB, C++Dec. 2013
Written in : C, Lua
Interface : C, LuaJul. 2014
Written in : Python
Interface : Python, RMar. 2015
Written in : C++, Python, CUDA
Interface : Python, C/C++, Java, Go, R, JuliaNov. 2015
Written in :
Interface : Python, C++Apr. 2017
Written in : Python, C, CUDA
Interface : PythonOct. 2016
**
DL4J(Java)
Chainer(Python)
MXNet(C++, Python, Julia, MATLAB, JavaScript, Go, R, Scala, Perl)
CNTK(Python, C++),
TF Learn(Python)
TF-Slim(Python)
Etc.
Recommend to choose these framework
• Deep Learning Framework
“What is this? Gum? It's GAN.”, pp. 21-22
Cf.
Setup
October 9, 2018
4
• Install
https://www.anaconda.com/download/
Setup
October 9, 2018
5
• Install
https://pytorch.org/
C++ : Preview,
Linux only
Setup
October 9, 2018
6
• Install
conda create -n PyTorch python=3.6
activate PyTorch
conda install pytorch cuda90 -c pytorch
pip install torchvision
o conda create는 환경 생성하는 명령어. PyTorch 뿐만 아니라 Tensorflow 같은 다른 딥러닝 프레임워크를
사용한다거나 하위 파이썬 버전도 사용해야하는 경우 환경마다 설정해주면, 디펜던시가 꼬이지 않음.
o -n 환경명, python=파이썬버전 입력. 환경설정 리스트는 conda env list를 입력하면 확인 가능.
o activate는 해당 환경을 활성화 시키는 명령어. 반대로 환경을 빠져나오는 명령어는 deactivate.
o PyTorch를 설치하는 명령어는 conda install pytorch cuda90 -c pytorch..
o torchvision은 딥러닝 학습에 많이 사용되는 데이터셋, 네트워크 구조, 이미지 변환과 같은 기능을 제공하므로
설치하는 것을 권장.
Setup
October 9, 2018
7
• Development Tools
: Cell based execution
: Intellisense
: Intellisense
: Management of python env.
: GitHub
: AI tool package
: Startup file
: Intellisense
: Cell based execution
: Management of python env.
: Extension program
: Insane extension program
: Intellisense
: Environment setting
Setup
October 9, 2018
8
• Development Tools
Personal opinion :
>
Setup
October 9, 2018
9
• Development Tools – Visual Studio
File-New-Project
Setup
October 9, 2018
10
• Development Tools – Visual Studio
File-New-Project
Python 도구 설치
Setup
October 9, 2018
11
• Development Tools – Visual Studio
File-New-Project
Python 도구 설치
Python Application
Setup
October 9, 2018
12
• Development Tools – Visual Studio
File-New-Project
Python 도구 설치
Python Application
Python 환경 추가
Setup
October 9, 2018
13
• Development Tools – Visual Studio
File-New-Project
Python 도구 설치
Python Application
Python 환경 추가
코드 작성
Setup
October 9, 2018
14
• Development Tools – Visual Studio
File-New-Project
Python 도구 설치
Python Application
Python 환경 추가
코드 작성
Setup
October 9, 2018
15
• Development Tools – Visual Studio
File-New-Project
Python 도구 설치
Python Application
Python 환경 추가
코드 작성
실행
: 시작 파일로 설정-> Ctrl+F5
Setup
October 9, 2018
16
• Development Tools – PyCharm
Setup
October 9, 2018
17
• Development Tools – PyCharm
Setup
October 9, 2018
18
• Development Tools – PyCharm
Setup
October 9, 2018
19
• Development Tools – PyCharm
Setup
October 9, 2018
20
• Development Tools – PyCharm
Setup
October 9, 2018
21
• Development Tools – PyCharm
File-New Project
Setup
October 9, 2018
22
• Development Tools – PyCharm
File-New Project
코드 작성
Setup
October 9, 2018
23
• Development Tools – PyCharm
File-New Project
코드 작성
실행
: Ctrl+F5
“Too easy, but important things”, pp. 42-43
Cf. TODO
Example
October 9, 2018
24
• Tensor
array Tensor
reshape view(reshape)
linspace linspace
ones, zeros ones, zeros
random.randn, random.rand randn, rand
from_numpy
numpy
to, cuda
Example
October 9, 2018
25
• Tensor
import torch as tc
#Tensor
a = tc.Tensor([2.5, 4])
b = tc.Tensor([[1, 2.5], [2.5, 6]])
#reshape
c = b.reshape(1, 4)
d = b.reshape(1, -1)
Tensor a :
tensor([ 2.5000, 4.0000])
Size of a : torch.Size([2])
Tensor b :
tensor([[ 1.0000, 2.5000],
[ 2.5000, 6.0000]])
Size of b : torch.Size([2, 2])
Tensor c :
tensor([[ 1.0000, 2.5000, 2.5000, 6.0000]])
Size of c : torch.Size([1, 4])
Tensor d :
tensor([[ 1.0000, 2.5000, 2.5000, 6.0000]])
Size of d : torch.Size([1, 4])
Example
October 9, 2018
26
• Tensor
Start End
0
#ones, zeros
real = tc.ones(2, 2)
fake = tc.zeros(2, 2)
1
#linspace
x = tc.linspace(-1, 1, 9)
Tensor x :
tensor([-1.0000, -0.7500, -0.5000,
-0.2500, 0.0000, 0.2500, 0.5000,
0.7500, 1.0000])
Size of x : torch.Size([9])
Tensor real :
tensor([[ 1., 1.],
[ 1., 1.]])
Size of real : torch.Size([2, 2])
Tensor fake :
tensor([[ 0., 0.],
[ 0., 0.]])
Size of fake : torch.Size([2, 2])
Example
October 9, 2018
27
• Tensor
0
1
0 1
#randn, rand
z1 = tc.randn(2, 3)
z2 = tc.rand(2, 3)
Tensor z1 :
tensor([[-0.0750, -1.0555, -0.0706],
[-0.1946, -0.8593, -0.2238]])
Size of z1 : torch.Size([2, 3])
Tensor z2 :
tensor([[ 0.8204, 0.3505, 0.1034],
[ 0.5318, 0.9543, 0.8781]])
Size of z2 : torch.Size([2, 3])
#to, cuda
z_cuda = z1.cuda()
device = tc.device('cuda' if tc.cuda.is_available() else 'cpu')
z_device = z1.to(device)
Tensor z_cuda :
tensor([[-0.0750, -1.0555, -0.0706],
[-0.1946, -0.8593, -0.2238]], device='cuda:0')
Tensor z_device :
tensor([[-0.0750, -1.0555, -0.0706],
[-0.1946, -0.8593, -0.2238]], device='cuda:0')
Example
October 9, 2018
28
• Tensor
#from_numpy, numpy
import numpy as np
a = np.array([3.5, 4])
b = tc.from_numpy(a)
c = b.numpy()
array a :
[3.5 4. ]
Tensor b :
tensor([ 3.5000, 4.0000], dtype=torch.float64)
array c :
[3.5 4. ]
Example
October 9, 2018
29
• Datasets
The following datasets are available:
MNIST
Fashion-MNIST
EMNIST
COCO
LSUN
ImageFolder
DatasetFolder
Imagenet-12
CIFAR
STL10
SVHN
PhotoTour
: 바로 사용 가능.
: 추가적인 과정 필요.
: Custom dataset에 활용.
MNIST Fashion-MNIST CIFAR
LSUN
CelebA K-pop(Custom)
Example
October 9, 2018
30
• Datasets – MNIST
trans
 Compose()is used when there are multiple transform options. Here, ToTensor() and Normalize(mean, std) are used.
 ToTensor () changes the PIL Image to a tensor. torchvision dataset The default type is PIL Image.
 Normalize (mean, std) transforms the range of the image. Here, the value of [0, 1] is adjusted to [-1, 1]. ((value-mean) / std)
trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
datasets = tv.datasets.MNIST(root='./MNIST', train=True, download=True, transform=trans)
dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True)
import torch as tc
import torchvision as tv
import torchvision.transforms as transforms
Example
October 9, 2018
31
• Datasets – MNIST
dataset
 root : This is the path to store (MNIST data). Folders are automatically created with the specified name.
 train : Set the data to be used for the train.
 transform : Transform the data according to the transform option set previously.
 download : Download (MINST data). (If you downloaded it once, it will not do it again.)
trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
datasets = tv.datasets.MNIST(root='./MNIST', train=True, download=True, transform=trans)
dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True)
import torch as tc
import torchvision as tv
import torchvision.transforms as transforms
Example
October 9, 2018
32
• Datasets – MNIST
dataloader
 dataset : Set the dataset to load.
 batch_size : Set the batch size.
 shuffle : Shuffle the data and load it.
trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
datasets = tv.datasets.MNIST(root='./MNIST', train=True, download=True, transform=trans)
dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True)
import torch as tc
import torchvision as tv
import torchvision.transforms as transforms
Example
October 9, 2018
33
• Datasets – LSUN
https://github.com/fyu/lsun
Example
October 9, 2018
34
• Datasets – LSUN
Run download.py
def list_categories(tag):
url = 'http://lsun.cs.princeton.edu/htbin/list.cgi?tag=' + tag
f = urlopen(url)
return json.loads(f.read())
If you are using Python 3.0 or later, modify the code from urllib2.urlopen (url) to urlopen (url).
download.py -c bedroom
bedroom 0
bridge 1
church_outdoor 2
classroom 3
conference_room 4
dining_room 5
kitchen 6
living_room 7
restaurant 8
tower 9
Example
October 9, 2018
35
• Datasets – LSUN
trans = transforms.Compose([transforms.Resize((64,64)) ,transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5),
(0.5, 0.5, 0.5))])
datasets = tv.datasets.LSUN('.', classes=['bedroom_train'], transform=trans)
dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True)
trans
 Resize() is used to resize the image.
datasets
 root : Root directory for the database files.
 classes : One of {‘train’, ‘val’, ‘test’} or a list of categories to load. e,g. [‘bedroom_train’, ‘church_train’].
Example
October 9, 2018
36
• Datasets – ImageFolder(CelebA)
http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html
Example
October 9, 2018
37
• Datasets – ImageFolder(CelebA)
http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html
압축을 풀면 jpg 형태로 파일들이 저장된 것을 확인할 수 있음.
Example
October 9, 2018
38
• Datasets – ImageFolder(CelebA)
trans = transforms.Compose([transforms.Resize((64,64)) ,transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5),
(0.5, 0.5, 0.5))])
datasets = tv.datasets.ImageFolder('./img_align_celeba', trans)
dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True)
datasets
 root : Root directory for the database files.
 transform : Transform the data according to the transform option set previously.
H
Example
October 9, 2018
39
• Neural Nets
Sequence baseClass base
model = tc.nn.Sequential(
tc.nn.Linear(D_in, H),
tc.nn.ReLU(),
tc.nn.Linear(H, D_out),
tc.nn.Sigmoid()
)
class Model(tc.nn.Module):
def __init__(self):
super(Model, self).__init__()
self.linear1 = tc.nn.Linear(D_in, H),
self.linear2 = tc.nn.Linear(H, D_out)
def forward(self, input):
x = tc.nn.functional.relu(self.linear1(input))
x = tc.nn.functional.sigmoid(self.linear2(x))
return x
D_in D_out
Data manipulation
Example
October 9, 2018
40
• Neural Nets
Class base
class Model(tc.nn.Module):
def __init__(self):
super(Model, self).__init__()
self.linear1 = tc.nn.Linear(D_in, H),
self.linear2 = tc.nn.Linear(H, D_out)
def forward(self, input):
x = tc.nn.functional.relu(self.linear1(input))
x = tc.nn.functional.sigmoid(self.linear2(x))
return x
tc.nn.Module
functions
Model
functions
생성자
부모 클래스 초기화
Propagation
Cf. Diamond problem
A
B C
D
Class D __init__()
Class B __init__()
Class A __init__()
Class C __init__()
Class A __init__()
Example
October 9, 2018
41
• Learning
Back
Propagation
(Learning)
Loss
Optimizer
loss_func = tc.nn.MSELoss()
opt = tc.optim.Adam(model.parameters(), lr=0.01 )
for ep in range(epoch_sz):
for step, (images, labels) in enumerate(dataloader):
opt.zero_grad()
images = images.to(device)
labels = labels.to(device)
output = model(images)
loss = loss_func(output)
loss.backward()
opt.step()
Example
October 9, 2018
42
• Learning
loss_func = tc.nn.MSELoss()
opt = tc.optim.Adam(model.parameters(), lr=0.01 )
for ep in range(epoch_sz):
for step, (images, labels) in enumerate(dataloader):
opt.zero_grad()
images = images.to(device)
labels = labels.to(device)
output = model(images)
loss = loss_func(output)
loss.backward()
opt.step()
Loss 선언
Optimizer 선언 (업데이트 하려는 parameter)
정해진 epoch 만큼 수행
앞서 설정한 dataloader에 따라 image(data)와 label(_) 불러옴
Gradient 초기화.
Loss 구함
Back propagation(Gradient 구함)
정해진 optimizer에 따라 parameter 업데이트
trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
datasets = tv.datasets.MNIST(root='./MNIST', train=True, download=True, transform=trans)
dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True)
Cf.
Example
October 9, 2018
43
• Learning
• L1Loss
• MSELoss
• CrossEntropyLoss
• NLLLoss
• PoissonNLLLoss
• KLDivLoss
• BCELoss
• BCEWithLogitsLoss
• MarginRankingLoss
• HingeEmbeddingLoss
• SmoothL1Loss
• SoftMarginLoss
• MultiLabelSoftMarginLoss
• CosineEmbeddingLoss
• MultiMarginLoss
• TripleMarginLoss
• Adadelta
• Adagrad
• Adam
• SparseAdam
• Adamax
• ASGD
• LBFGS
• RMSprop
• Rprop
• SGD
Loss Optimizer
* Bold체는 주로 사용하는 함수들.
Example
• Applications –Vanilla GAN
2018-10-09
44
https://github.com/messy-snail/GAN_PyTorch
“What is this? Gum? It's GAN.”
Cf.
Example
• Applications –Vanilla GAN
2018-10-09
45
Sequence baseClass base
Neural Nets
Example
• Applications –Vanilla GAN
2018-10-09
46
Example
• Applications –Vanilla GAN
2018-10-09
47
Images(batch=100)
…
28
28
100
Reshape(28*28*1->784)
7
8
4
7
8
4…
7
8
4
100
1
0
0
Noise(z)
Label
1 0
Real Fake
Example
• Applications –Vanilla GAN
2018-10-09
48
1
0
0
Noise(z)
Label
1 0
Real Fake
G (z)
Generate
D(Fakes)
D(Images)
Discriminate
Loss
Real
Loss
Fake
Loss
Reshape(28*28*1->784)
7
8
4
7
8
4…
7
8
4
100
Example
• Applications –Vanilla GAN
2018-10-09
49
D(Fakes)
D(Images)
Discriminate
Loss
Real
Loss
Fake
Total
Loss
Loss
Update
Example
• Applications –Vanilla GAN
2018-10-09
50
1
0
0
Noise(z) Label
1
Real
G (z)
Generate
D(Fakes)
Discriminate
Loss
g
Loss
Update
Future Work
October 9, 2018
51
Paper Review
Vanilla GAN
DCGAN
InfoGAN
Unrolled GAN
Wasserstein GAN
LS GAN
BEGAN
Pix2Pix
Cycle GAN
Proposed Model
SpyGAN
Tools
Document
Programming
PyTorch
Python executable & UI
Mathematical Study
Linear algebra
Probability and statistics
Information theory
Others
Level Processor
Ice Propagation
Maybe next seminar?
52
&

More Related Content

What's hot

Pytorch for tf_developers
Pytorch for tf_developersPytorch for tf_developers
Pytorch for tf_developersAbdul Muneer
 
Python NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | EdurekaPython NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | EdurekaEdureka!
 
Transfer learning, active learning using tensorflow object detection api
Transfer learning, active learning  using tensorflow object detection apiTransfer learning, active learning  using tensorflow object detection api
Transfer learning, active learning using tensorflow object detection api설기 김
 
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from..."PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...Edge AI and Vision Alliance
 
Scaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUsScaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUsTravis Oliphant
 
Large scale logistic regression and linear support vector machines using spark
Large scale logistic regression and linear support vector machines using sparkLarge scale logistic regression and linear support vector machines using spark
Large scale logistic regression and linear support vector machines using sparkMila, Université de Montréal
 
Real-Time Big Data Stream Analytics
Real-Time Big Data Stream AnalyticsReal-Time Big Data Stream Analytics
Real-Time Big Data Stream AnalyticsAlbert Bifet
 
Real Time Big Data Management
Real Time Big Data ManagementReal Time Big Data Management
Real Time Big Data ManagementAlbert Bifet
 
Automatic Features Generation And Model Training On Spark: A Bayesian Approach
Automatic Features Generation And Model Training On Spark: A Bayesian ApproachAutomatic Features Generation And Model Training On Spark: A Bayesian Approach
Automatic Features Generation And Model Training On Spark: A Bayesian ApproachSpark Summit
 
Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19GoDataDriven
 
Keynote at Converge 2019
Keynote at Converge 2019Keynote at Converge 2019
Keynote at Converge 2019Travis Oliphant
 
Scaling out logistic regression with Spark
Scaling out logistic regression with SparkScaling out logistic regression with Spark
Scaling out logistic regression with SparkBarak Gitsis
 
2014-06-20 Multinomial Logistic Regression with Apache Spark
2014-06-20 Multinomial Logistic Regression with Apache Spark2014-06-20 Multinomial Logistic Regression with Apache Spark
2014-06-20 Multinomial Logistic Regression with Apache SparkDB Tsai
 
Working with the Scalding Type-Safe API
Working with the Scalding Type-Safe API Working with the Scalding Type-Safe API
Working with the Scalding Type-Safe API Criteolabs
 
The Joy of SciPy
The Joy of SciPyThe Joy of SciPy
The Joy of SciPykammeyer
 
CppConcurrencyInAction - Chapter07
CppConcurrencyInAction - Chapter07CppConcurrencyInAction - Chapter07
CppConcurrencyInAction - Chapter07DooSeon Choi
 
DPF 2017: GPUs in LHCb for Analysis
DPF 2017: GPUs in LHCb for AnalysisDPF 2017: GPUs in LHCb for Analysis
DPF 2017: GPUs in LHCb for AnalysisHenry Schreiner
 

What's hot (20)

Pytorch for tf_developers
Pytorch for tf_developersPytorch for tf_developers
Pytorch for tf_developers
 
Python NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | EdurekaPython NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | Edureka
 
Aaex3 group2
Aaex3 group2Aaex3 group2
Aaex3 group2
 
Transfer learning, active learning using tensorflow object detection api
Transfer learning, active learning  using tensorflow object detection apiTransfer learning, active learning  using tensorflow object detection api
Transfer learning, active learning using tensorflow object detection api
 
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from..."PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
 
Scaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUsScaling Python to CPUs and GPUs
Scaling Python to CPUs and GPUs
 
Large scale logistic regression and linear support vector machines using spark
Large scale logistic regression and linear support vector machines using sparkLarge scale logistic regression and linear support vector machines using spark
Large scale logistic regression and linear support vector machines using spark
 
Real-Time Big Data Stream Analytics
Real-Time Big Data Stream AnalyticsReal-Time Big Data Stream Analytics
Real-Time Big Data Stream Analytics
 
PyCon Estonia 2019
PyCon Estonia 2019PyCon Estonia 2019
PyCon Estonia 2019
 
Real Time Big Data Management
Real Time Big Data ManagementReal Time Big Data Management
Real Time Big Data Management
 
Automatic Features Generation And Model Training On Spark: A Bayesian Approach
Automatic Features Generation And Model Training On Spark: A Bayesian ApproachAutomatic Features Generation And Model Training On Spark: A Bayesian Approach
Automatic Features Generation And Model Training On Spark: A Bayesian Approach
 
Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19
 
Keynote at Converge 2019
Keynote at Converge 2019Keynote at Converge 2019
Keynote at Converge 2019
 
Scaling out logistic regression with Spark
Scaling out logistic regression with SparkScaling out logistic regression with Spark
Scaling out logistic regression with Spark
 
2014-06-20 Multinomial Logistic Regression with Apache Spark
2014-06-20 Multinomial Logistic Regression with Apache Spark2014-06-20 Multinomial Logistic Regression with Apache Spark
2014-06-20 Multinomial Logistic Regression with Apache Spark
 
Working with the Scalding Type-Safe API
Working with the Scalding Type-Safe API Working with the Scalding Type-Safe API
Working with the Scalding Type-Safe API
 
Pythonic Math
Pythonic MathPythonic Math
Pythonic Math
 
The Joy of SciPy
The Joy of SciPyThe Joy of SciPy
The Joy of SciPy
 
CppConcurrencyInAction - Chapter07
CppConcurrencyInAction - Chapter07CppConcurrencyInAction - Chapter07
CppConcurrencyInAction - Chapter07
 
DPF 2017: GPUs in LHCb for Analysis
DPF 2017: GPUs in LHCb for AnalysisDPF 2017: GPUs in LHCb for Analysis
DPF 2017: GPUs in LHCb for Analysis
 

Similar to Touch to PyTorch: From basic to vanilla GAN

Pytroch-basic.pptx
Pytroch-basic.pptxPytroch-basic.pptx
Pytroch-basic.pptxrebeen4
 
OpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon ValleyOpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon ValleyGanesan Narayanasamy
 
Machine learning with py torch
Machine learning with py torchMachine learning with py torch
Machine learning with py torchRiza Fahmi
 
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...gdgsurrey
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using PythonNishantKumar1179
 
A Map of the PyData Stack
A Map of the PyData StackA Map of the PyData Stack
A Map of the PyData StackPeadar Coyle
 
Unleashing the Power of Python Using the New Minitab/Python Integration Modul...
Unleashing the Power of Python Using the New Minitab/Python Integration Modul...Unleashing the Power of Python Using the New Minitab/Python Integration Modul...
Unleashing the Power of Python Using the New Minitab/Python Integration Modul...Minitab, LLC
 
Swift for tensorflow
Swift for tensorflowSwift for tensorflow
Swift for tensorflow규영 허
 
Eclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science ProjectEclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science ProjectMatthew Gerring
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxSandeep Singh
 
Python for Data Analysis.pdf
Python for Data Analysis.pdfPython for Data Analysis.pdf
Python for Data Analysis.pdfJulioRecaldeLara1
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxtangadhurai
 
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...Red Hat Developers
 
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonkannikadg
 
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...Databricks
 
Workshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen TatarynovWorkshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen TatarynovFwdays
 

Similar to Touch to PyTorch: From basic to vanilla GAN (20)

Pytroch-basic.pptx
Pytroch-basic.pptxPytroch-basic.pptx
Pytroch-basic.pptx
 
OpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon ValleyOpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon Valley
 
Machine learning with py torch
Machine learning with py torchMachine learning with py torch
Machine learning with py torch
 
Icpp power ai-workshop 2018
Icpp power ai-workshop 2018Icpp power ai-workshop 2018
Icpp power ai-workshop 2018
 
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
 
A Map of the PyData Stack
A Map of the PyData StackA Map of the PyData Stack
A Map of the PyData Stack
 
Python for data analysis
Python for data analysisPython for data analysis
Python for data analysis
 
Unleashing the Power of Python Using the New Minitab/Python Integration Modul...
Unleashing the Power of Python Using the New Minitab/Python Integration Modul...Unleashing the Power of Python Using the New Minitab/Python Integration Modul...
Unleashing the Power of Python Using the New Minitab/Python Integration Modul...
 
More on Pandas.pptx
More on Pandas.pptxMore on Pandas.pptx
More on Pandas.pptx
 
PMED Undergraduate Workshop - R Tutorial for PMED Undegraduate Workshop - Xi...
PMED Undergraduate Workshop - R Tutorial for PMED Undegraduate Workshop  - Xi...PMED Undergraduate Workshop - R Tutorial for PMED Undegraduate Workshop  - Xi...
PMED Undergraduate Workshop - R Tutorial for PMED Undegraduate Workshop - Xi...
 
Swift for tensorflow
Swift for tensorflowSwift for tensorflow
Swift for tensorflow
 
Eclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science ProjectEclipse Con Europe 2014 How to use DAWN Science Project
Eclipse Con Europe 2014 How to use DAWN Science Project
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptx
 
Python for Data Analysis.pdf
Python for Data Analysis.pdfPython for Data Analysis.pdf
Python for Data Analysis.pdf
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptx
 
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
 
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on python
 
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
 
Workshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen TatarynovWorkshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
 

More from Hansol Kang

ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )Hansol Kang
 
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)Hansol Kang
 
알아두면 쓸모있는 깃허브 2
알아두면 쓸모있는 깃허브 2알아두면 쓸모있는 깃허브 2
알아두면 쓸모있는 깃허브 2Hansol Kang
 
알아두면 쓸모있는 깃허브 1
알아두면 쓸모있는 깃허브 1알아두면 쓸모있는 깃허브 1
알아두면 쓸모있는 깃허브 1Hansol Kang
 
basic of deep learning
basic of deep learningbasic of deep learning
basic of deep learningHansol Kang
 
파이썬 제대로 활용하기
파이썬 제대로 활용하기파이썬 제대로 활용하기
파이썬 제대로 활용하기Hansol Kang
 
모던 C++ 정리
모던 C++ 정리모던 C++ 정리
모던 C++ 정리Hansol Kang
 
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Hansol Kang
 
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)Hansol Kang
 
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...Hansol Kang
 
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)Hansol Kang
 
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)Hansol Kang
 
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법Hansol Kang
 
QT 프로그래밍 기초(basic of QT programming tutorial)
QT 프로그래밍 기초(basic of QT programming tutorial)QT 프로그래밍 기초(basic of QT programming tutorial)
QT 프로그래밍 기초(basic of QT programming tutorial)Hansol Kang
 
Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)Hansol Kang
 
Mobile Robot PD and DOB control
Mobile Robot PD and DOB controlMobile Robot PD and DOB control
Mobile Robot PD and DOB controlHansol Kang
 
딥러닝 기초 - XOR 문제와 딥뉴럴넷(Basic of DL - XOR problem and DNN)
딥러닝 기초 - XOR 문제와 딥뉴럴넷(Basic of DL - XOR problem and DNN)딥러닝 기초 - XOR 문제와 딥뉴럴넷(Basic of DL - XOR problem and DNN)
딥러닝 기초 - XOR 문제와 딥뉴럴넷(Basic of DL - XOR problem and DNN)Hansol Kang
 
머신 러닝 기초 - 회귀 및 분류 (Basic of ML - Regression and Classification)
머신 러닝 기초 - 회귀 및 분류 (Basic of ML - Regression and Classification)머신 러닝 기초 - 회귀 및 분류 (Basic of ML - Regression and Classification)
머신 러닝 기초 - 회귀 및 분류 (Basic of ML - Regression and Classification)Hansol Kang
 

More from Hansol Kang (20)

ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
ROS 시작하기(Getting Started with ROS:: Your First Steps in Robot Programming )
 
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
관측 임무스케줄링 (Selecting and scheduling observations of agile satellites)
 
알아두면 쓸모있는 깃허브 2
알아두면 쓸모있는 깃허브 2알아두면 쓸모있는 깃허브 2
알아두면 쓸모있는 깃허브 2
 
알아두면 쓸모있는 깃허브 1
알아두면 쓸모있는 깃허브 1알아두면 쓸모있는 깃허브 1
알아두면 쓸모있는 깃허브 1
 
FPN 리뷰
FPN 리뷰FPN 리뷰
FPN 리뷰
 
R-FCN 리뷰
R-FCN 리뷰R-FCN 리뷰
R-FCN 리뷰
 
basic of deep learning
basic of deep learningbasic of deep learning
basic of deep learning
 
파이썬 제대로 활용하기
파이썬 제대로 활용하기파이썬 제대로 활용하기
파이썬 제대로 활용하기
 
모던 C++ 정리
모던 C++ 정리모던 C++ 정리
모던 C++ 정리
 
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
 
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
LSGAN - SIMPle(Simple Idea Meaningful Performance Level up)
 
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
InfoGAN : Interpretable Representation Learning by Information Maximizing Gen...
 
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
문서와 개발에 필요한 간단한 팁들(Too easy, but important things - document, development)
 
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
신뢰 전파 기법을 이용한 스테레오 정합(Stereo matching using belief propagation algorithm)
 
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
HSV 컬러 공간에서의 레티넥스와 채도 보정을 이용한 화질 개선 기법
 
QT 프로그래밍 기초(basic of QT programming tutorial)
QT 프로그래밍 기초(basic of QT programming tutorial)QT 프로그래밍 기초(basic of QT programming tutorial)
QT 프로그래밍 기초(basic of QT programming tutorial)
 
Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)Continuously Adaptive Mean Shift(CAMSHIFT)
Continuously Adaptive Mean Shift(CAMSHIFT)
 
Mobile Robot PD and DOB control
Mobile Robot PD and DOB controlMobile Robot PD and DOB control
Mobile Robot PD and DOB control
 
딥러닝 기초 - XOR 문제와 딥뉴럴넷(Basic of DL - XOR problem and DNN)
딥러닝 기초 - XOR 문제와 딥뉴럴넷(Basic of DL - XOR problem and DNN)딥러닝 기초 - XOR 문제와 딥뉴럴넷(Basic of DL - XOR problem and DNN)
딥러닝 기초 - XOR 문제와 딥뉴럴넷(Basic of DL - XOR problem and DNN)
 
머신 러닝 기초 - 회귀 및 분류 (Basic of ML - Regression and Classification)
머신 러닝 기초 - 회귀 및 분류 (Basic of ML - Regression and Classification)머신 러닝 기초 - 회귀 및 분류 (Basic of ML - Regression and Classification)
머신 러닝 기초 - 회귀 및 분류 (Basic of ML - Regression and Classification)
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Touch to PyTorch: From basic to vanilla GAN

  • 1. Touch to PyTorch ISL Lab Seminar Hansol Kang : From basic to vanilla GAN
  • 2. Contents October 9, 2018 Setup Install Development Tools Example What is PyTorch? PyTorch Deep Learning Framework Tensor Datasets Neural Nets Learning Applications
  • 3. What is PyTorch? October 9, 2018 2 an open source machine learning library for Python. It is primarily developed by Facebook's artificial-intelligence research group. • PyTorch Vs.
  • 4. What is PyTorch? October 9, 2018 3 Written in : Python Interface : PythonNov. 2010 Written in : C++ Interface : Python, MATLAB, C++Dec. 2013 Written in : C, Lua Interface : C, LuaJul. 2014 Written in : Python Interface : Python, RMar. 2015 Written in : C++, Python, CUDA Interface : Python, C/C++, Java, Go, R, JuliaNov. 2015 Written in : Interface : Python, C++Apr. 2017 Written in : Python, C, CUDA Interface : PythonOct. 2016 ** DL4J(Java) Chainer(Python) MXNet(C++, Python, Julia, MATLAB, JavaScript, Go, R, Scala, Perl) CNTK(Python, C++), TF Learn(Python) TF-Slim(Python) Etc. Recommend to choose these framework • Deep Learning Framework “What is this? Gum? It's GAN.”, pp. 21-22 Cf.
  • 5. Setup October 9, 2018 4 • Install https://www.anaconda.com/download/
  • 6. Setup October 9, 2018 5 • Install https://pytorch.org/ C++ : Preview, Linux only
  • 7. Setup October 9, 2018 6 • Install conda create -n PyTorch python=3.6 activate PyTorch conda install pytorch cuda90 -c pytorch pip install torchvision o conda create는 환경 생성하는 명령어. PyTorch 뿐만 아니라 Tensorflow 같은 다른 딥러닝 프레임워크를 사용한다거나 하위 파이썬 버전도 사용해야하는 경우 환경마다 설정해주면, 디펜던시가 꼬이지 않음. o -n 환경명, python=파이썬버전 입력. 환경설정 리스트는 conda env list를 입력하면 확인 가능. o activate는 해당 환경을 활성화 시키는 명령어. 반대로 환경을 빠져나오는 명령어는 deactivate. o PyTorch를 설치하는 명령어는 conda install pytorch cuda90 -c pytorch.. o torchvision은 딥러닝 학습에 많이 사용되는 데이터셋, 네트워크 구조, 이미지 변환과 같은 기능을 제공하므로 설치하는 것을 권장.
  • 8. Setup October 9, 2018 7 • Development Tools : Cell based execution : Intellisense : Intellisense : Management of python env. : GitHub : AI tool package : Startup file : Intellisense : Cell based execution : Management of python env. : Extension program : Insane extension program : Intellisense : Environment setting
  • 9. Setup October 9, 2018 8 • Development Tools Personal opinion : >
  • 10. Setup October 9, 2018 9 • Development Tools – Visual Studio File-New-Project
  • 11. Setup October 9, 2018 10 • Development Tools – Visual Studio File-New-Project Python 도구 설치
  • 12. Setup October 9, 2018 11 • Development Tools – Visual Studio File-New-Project Python 도구 설치 Python Application
  • 13. Setup October 9, 2018 12 • Development Tools – Visual Studio File-New-Project Python 도구 설치 Python Application Python 환경 추가
  • 14. Setup October 9, 2018 13 • Development Tools – Visual Studio File-New-Project Python 도구 설치 Python Application Python 환경 추가 코드 작성
  • 15. Setup October 9, 2018 14 • Development Tools – Visual Studio File-New-Project Python 도구 설치 Python Application Python 환경 추가 코드 작성
  • 16. Setup October 9, 2018 15 • Development Tools – Visual Studio File-New-Project Python 도구 설치 Python Application Python 환경 추가 코드 작성 실행 : 시작 파일로 설정-> Ctrl+F5
  • 17. Setup October 9, 2018 16 • Development Tools – PyCharm
  • 18. Setup October 9, 2018 17 • Development Tools – PyCharm
  • 19. Setup October 9, 2018 18 • Development Tools – PyCharm
  • 20. Setup October 9, 2018 19 • Development Tools – PyCharm
  • 21. Setup October 9, 2018 20 • Development Tools – PyCharm
  • 22. Setup October 9, 2018 21 • Development Tools – PyCharm File-New Project
  • 23. Setup October 9, 2018 22 • Development Tools – PyCharm File-New Project 코드 작성
  • 24. Setup October 9, 2018 23 • Development Tools – PyCharm File-New Project 코드 작성 실행 : Ctrl+F5 “Too easy, but important things”, pp. 42-43 Cf. TODO
  • 25. Example October 9, 2018 24 • Tensor array Tensor reshape view(reshape) linspace linspace ones, zeros ones, zeros random.randn, random.rand randn, rand from_numpy numpy to, cuda
  • 26. Example October 9, 2018 25 • Tensor import torch as tc #Tensor a = tc.Tensor([2.5, 4]) b = tc.Tensor([[1, 2.5], [2.5, 6]]) #reshape c = b.reshape(1, 4) d = b.reshape(1, -1) Tensor a : tensor([ 2.5000, 4.0000]) Size of a : torch.Size([2]) Tensor b : tensor([[ 1.0000, 2.5000], [ 2.5000, 6.0000]]) Size of b : torch.Size([2, 2]) Tensor c : tensor([[ 1.0000, 2.5000, 2.5000, 6.0000]]) Size of c : torch.Size([1, 4]) Tensor d : tensor([[ 1.0000, 2.5000, 2.5000, 6.0000]]) Size of d : torch.Size([1, 4])
  • 27. Example October 9, 2018 26 • Tensor Start End 0 #ones, zeros real = tc.ones(2, 2) fake = tc.zeros(2, 2) 1 #linspace x = tc.linspace(-1, 1, 9) Tensor x : tensor([-1.0000, -0.7500, -0.5000, -0.2500, 0.0000, 0.2500, 0.5000, 0.7500, 1.0000]) Size of x : torch.Size([9]) Tensor real : tensor([[ 1., 1.], [ 1., 1.]]) Size of real : torch.Size([2, 2]) Tensor fake : tensor([[ 0., 0.], [ 0., 0.]]) Size of fake : torch.Size([2, 2])
  • 28. Example October 9, 2018 27 • Tensor 0 1 0 1 #randn, rand z1 = tc.randn(2, 3) z2 = tc.rand(2, 3) Tensor z1 : tensor([[-0.0750, -1.0555, -0.0706], [-0.1946, -0.8593, -0.2238]]) Size of z1 : torch.Size([2, 3]) Tensor z2 : tensor([[ 0.8204, 0.3505, 0.1034], [ 0.5318, 0.9543, 0.8781]]) Size of z2 : torch.Size([2, 3]) #to, cuda z_cuda = z1.cuda() device = tc.device('cuda' if tc.cuda.is_available() else 'cpu') z_device = z1.to(device) Tensor z_cuda : tensor([[-0.0750, -1.0555, -0.0706], [-0.1946, -0.8593, -0.2238]], device='cuda:0') Tensor z_device : tensor([[-0.0750, -1.0555, -0.0706], [-0.1946, -0.8593, -0.2238]], device='cuda:0')
  • 29. Example October 9, 2018 28 • Tensor #from_numpy, numpy import numpy as np a = np.array([3.5, 4]) b = tc.from_numpy(a) c = b.numpy() array a : [3.5 4. ] Tensor b : tensor([ 3.5000, 4.0000], dtype=torch.float64) array c : [3.5 4. ]
  • 30. Example October 9, 2018 29 • Datasets The following datasets are available: MNIST Fashion-MNIST EMNIST COCO LSUN ImageFolder DatasetFolder Imagenet-12 CIFAR STL10 SVHN PhotoTour : 바로 사용 가능. : 추가적인 과정 필요. : Custom dataset에 활용. MNIST Fashion-MNIST CIFAR LSUN CelebA K-pop(Custom)
  • 31. Example October 9, 2018 30 • Datasets – MNIST trans  Compose()is used when there are multiple transform options. Here, ToTensor() and Normalize(mean, std) are used.  ToTensor () changes the PIL Image to a tensor. torchvision dataset The default type is PIL Image.  Normalize (mean, std) transforms the range of the image. Here, the value of [0, 1] is adjusted to [-1, 1]. ((value-mean) / std) trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) datasets = tv.datasets.MNIST(root='./MNIST', train=True, download=True, transform=trans) dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True) import torch as tc import torchvision as tv import torchvision.transforms as transforms
  • 32. Example October 9, 2018 31 • Datasets – MNIST dataset  root : This is the path to store (MNIST data). Folders are automatically created with the specified name.  train : Set the data to be used for the train.  transform : Transform the data according to the transform option set previously.  download : Download (MINST data). (If you downloaded it once, it will not do it again.) trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) datasets = tv.datasets.MNIST(root='./MNIST', train=True, download=True, transform=trans) dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True) import torch as tc import torchvision as tv import torchvision.transforms as transforms
  • 33. Example October 9, 2018 32 • Datasets – MNIST dataloader  dataset : Set the dataset to load.  batch_size : Set the batch size.  shuffle : Shuffle the data and load it. trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) datasets = tv.datasets.MNIST(root='./MNIST', train=True, download=True, transform=trans) dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True) import torch as tc import torchvision as tv import torchvision.transforms as transforms
  • 34. Example October 9, 2018 33 • Datasets – LSUN https://github.com/fyu/lsun
  • 35. Example October 9, 2018 34 • Datasets – LSUN Run download.py def list_categories(tag): url = 'http://lsun.cs.princeton.edu/htbin/list.cgi?tag=' + tag f = urlopen(url) return json.loads(f.read()) If you are using Python 3.0 or later, modify the code from urllib2.urlopen (url) to urlopen (url). download.py -c bedroom bedroom 0 bridge 1 church_outdoor 2 classroom 3 conference_room 4 dining_room 5 kitchen 6 living_room 7 restaurant 8 tower 9
  • 36. Example October 9, 2018 35 • Datasets – LSUN trans = transforms.Compose([transforms.Resize((64,64)) ,transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) datasets = tv.datasets.LSUN('.', classes=['bedroom_train'], transform=trans) dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True) trans  Resize() is used to resize the image. datasets  root : Root directory for the database files.  classes : One of {‘train’, ‘val’, ‘test’} or a list of categories to load. e,g. [‘bedroom_train’, ‘church_train’].
  • 37. Example October 9, 2018 36 • Datasets – ImageFolder(CelebA) http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html
  • 38. Example October 9, 2018 37 • Datasets – ImageFolder(CelebA) http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html 압축을 풀면 jpg 형태로 파일들이 저장된 것을 확인할 수 있음.
  • 39. Example October 9, 2018 38 • Datasets – ImageFolder(CelebA) trans = transforms.Compose([transforms.Resize((64,64)) ,transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) datasets = tv.datasets.ImageFolder('./img_align_celeba', trans) dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True) datasets  root : Root directory for the database files.  transform : Transform the data according to the transform option set previously.
  • 40. H Example October 9, 2018 39 • Neural Nets Sequence baseClass base model = tc.nn.Sequential( tc.nn.Linear(D_in, H), tc.nn.ReLU(), tc.nn.Linear(H, D_out), tc.nn.Sigmoid() ) class Model(tc.nn.Module): def __init__(self): super(Model, self).__init__() self.linear1 = tc.nn.Linear(D_in, H), self.linear2 = tc.nn.Linear(H, D_out) def forward(self, input): x = tc.nn.functional.relu(self.linear1(input)) x = tc.nn.functional.sigmoid(self.linear2(x)) return x D_in D_out Data manipulation
  • 41. Example October 9, 2018 40 • Neural Nets Class base class Model(tc.nn.Module): def __init__(self): super(Model, self).__init__() self.linear1 = tc.nn.Linear(D_in, H), self.linear2 = tc.nn.Linear(H, D_out) def forward(self, input): x = tc.nn.functional.relu(self.linear1(input)) x = tc.nn.functional.sigmoid(self.linear2(x)) return x tc.nn.Module functions Model functions 생성자 부모 클래스 초기화 Propagation Cf. Diamond problem A B C D Class D __init__() Class B __init__() Class A __init__() Class C __init__() Class A __init__()
  • 42. Example October 9, 2018 41 • Learning Back Propagation (Learning) Loss Optimizer loss_func = tc.nn.MSELoss() opt = tc.optim.Adam(model.parameters(), lr=0.01 ) for ep in range(epoch_sz): for step, (images, labels) in enumerate(dataloader): opt.zero_grad() images = images.to(device) labels = labels.to(device) output = model(images) loss = loss_func(output) loss.backward() opt.step()
  • 43. Example October 9, 2018 42 • Learning loss_func = tc.nn.MSELoss() opt = tc.optim.Adam(model.parameters(), lr=0.01 ) for ep in range(epoch_sz): for step, (images, labels) in enumerate(dataloader): opt.zero_grad() images = images.to(device) labels = labels.to(device) output = model(images) loss = loss_func(output) loss.backward() opt.step() Loss 선언 Optimizer 선언 (업데이트 하려는 parameter) 정해진 epoch 만큼 수행 앞서 설정한 dataloader에 따라 image(data)와 label(_) 불러옴 Gradient 초기화. Loss 구함 Back propagation(Gradient 구함) 정해진 optimizer에 따라 parameter 업데이트 trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]) datasets = tv.datasets.MNIST(root='./MNIST', train=True, download=True, transform=trans) dataloader = tc.utils.data.DataLoader(datasets=datasets, batch_size=100, shuffle=True) Cf.
  • 44. Example October 9, 2018 43 • Learning • L1Loss • MSELoss • CrossEntropyLoss • NLLLoss • PoissonNLLLoss • KLDivLoss • BCELoss • BCEWithLogitsLoss • MarginRankingLoss • HingeEmbeddingLoss • SmoothL1Loss • SoftMarginLoss • MultiLabelSoftMarginLoss • CosineEmbeddingLoss • MultiMarginLoss • TripleMarginLoss • Adadelta • Adagrad • Adam • SparseAdam • Adamax • ASGD • LBFGS • RMSprop • Rprop • SGD Loss Optimizer * Bold체는 주로 사용하는 함수들.
  • 45. Example • Applications –Vanilla GAN 2018-10-09 44 https://github.com/messy-snail/GAN_PyTorch “What is this? Gum? It's GAN.” Cf.
  • 46. Example • Applications –Vanilla GAN 2018-10-09 45 Sequence baseClass base Neural Nets
  • 48. Example • Applications –Vanilla GAN 2018-10-09 47 Images(batch=100) … 28 28 100 Reshape(28*28*1->784) 7 8 4 7 8 4… 7 8 4 100 1 0 0 Noise(z) Label 1 0 Real Fake
  • 49. Example • Applications –Vanilla GAN 2018-10-09 48 1 0 0 Noise(z) Label 1 0 Real Fake G (z) Generate D(Fakes) D(Images) Discriminate Loss Real Loss Fake Loss Reshape(28*28*1->784) 7 8 4 7 8 4… 7 8 4 100
  • 50. Example • Applications –Vanilla GAN 2018-10-09 49 D(Fakes) D(Images) Discriminate Loss Real Loss Fake Total Loss Loss Update
  • 51. Example • Applications –Vanilla GAN 2018-10-09 50 1 0 0 Noise(z) Label 1 Real G (z) Generate D(Fakes) Discriminate Loss g Loss Update
  • 52. Future Work October 9, 2018 51 Paper Review Vanilla GAN DCGAN InfoGAN Unrolled GAN Wasserstein GAN LS GAN BEGAN Pix2Pix Cycle GAN Proposed Model SpyGAN Tools Document Programming PyTorch Python executable & UI Mathematical Study Linear algebra Probability and statistics Information theory Others Level Processor Ice Propagation Maybe next seminar?
  • 53. 52 &