This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="jumbotron"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<h1 class"text-center">Vaibhav Kumar Chaudhary</h1> | |
<h2 class="text-center">the guy who wrote this page</h2> | |
<div class="thumbnail"> | |
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTIvcpON6b8VUSaslbX7HEki3qBED9RRtuKpXs1svDZS2gjTG9lnA" alt="a handsome guy"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
details summary { | |
cursor: pointer; | |
outline: none !important; | |
display: inline-block; | |
padding: 8px 12px; | |
padding-top: 10px; | |
border-radius: 4px; | |
overflow: hidden; | |
background: #F09825; | |
color: white; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import numpy as np | |
import matplotlib.pyplot as plt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = torch.ones(3, 2) | |
print(x) | |
x = torch.zeros(3, 2) | |
print(x) | |
x = torch.rand(3, 2) | |
print(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = np.random.randn(5) | |
print(a) | |
a_pt = torch.from_numpy(a) | |
print(type(a), type(a_pt)) | |
print(a_pt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = torch.ones(3, 2, device=cuda0) | |
b = torch.ones(3, 2, device=cuda0) | |
c = a + b | |
print(c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
y = x + 5 | |
z = y*y + 1 | |
t = torch.sum(z) | |
t.backward() | |
print(x.grad) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = torch.ones([3, 2], requires_grad=True) | |
y = x + 5 | |
r = 1/(1 + torch.exp(-y)) | |
print(r) | |
s = torch.sum(r) | |
s.backward() | |
print(x.grad) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = torch.ones([3, 2], requires_grad=True) | |
y = x + 5 | |
r = 1/(1 + torch.exp(-y)) | |
print(r) | |
s = torch.sum(r) | |
s.backward() | |
print(x.grad) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = torch.ones([3, 2], requires_grad=True) | |
y = x + 5 | |
r = 1/(1 + torch.exp(-y)) | |
a = torch.ones([3, 2]) | |
r.backward(a) | |
print(x.grad) |
OlderNewer