CAP5415 Computer Vision - UCF CRCV

CAP5415

Computer Vision

Yogesh S Rawat

yogesh@ucf.edu

HEC-241

9/25/2020

CAP5415 - Lecture 8

1

PyTorch Tutorial - I

Lecture 8

9/25/2020

CAP5415 - Lecture 8

2

Deep learning libraries

? Torch (Lua):

?

? PyTorch (Python)

?

? TensorFlow (Python and C++):

?

? Theano (Python)

?

? Keras

?

9/25/2020

CAP5415 - Lecture 8

3

PyTorch Tensor

? Similar to NumPy arrays

import torch

? They can also be used on a GPU

x=torch.rand(2,3)

y=torch.rand(3,3)

? Faster computation

? Random matrix

9/25/2020

print x

print y

CAP5415 - Lecture 8

4

PyTorch Tensor

? Similar to NumPy arrays

import torch

? They can also be used on a GPU

? Faster computation

? All zeros

? Directly from data

x = torch.zeros(5, 3)

x = torch.tensor([5.5, 3])

print x.size()

? Size of a tensor

9/25/2020

CAP5415 - Lecture 8

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download