Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dgcnz committed Oct 25, 2024
1 parent cb05d1b commit f8d6376
Show file tree
Hide file tree
Showing 5 changed files with 346 additions and 357 deletions.
20 changes: 20 additions & 0 deletions docs/src/part3/part3_artifacts/simple_fpn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import torch.nn as nn
import torch
import torch.nn.functional as F

class SimpleNet(nn.Module):
"""
Just a simple network
"""
def __init__(self):
super().__init__()
self.conv = nn.Conv2d(3, 6, 5)
self.fc = nn.Linear(6 * 14 * 14, 10)

def forward(self, x: torch.Tensor):
x = self.conv(x)
x = F.relu(x)
x = F.max_pool2d(x, (2, 2))
x = torch.flatten(x, 1)
x = self.fc(x)
return x
22 changes: 22 additions & 0 deletions docs/src/part3/part3_artifacts/simple_net.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import torch.nn as nn
import torch
import torch.nn.functional as F

class SimpleNet(nn.Module):
"""
Just a simple network
"""
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 6, 5)
self.conv2 = nn.Conv2d(6, 9, 5)
self.fc = nn.Linear(5184, 10)

def forward(self, x: torch.Tensor):
x = self.conv1(x)
x = F.relu(x)
x = self.conv2(x)
x = F.relu(x)
x = torch.flatten(x, 1)
x = self.fc(x)
return x
Binary file added docs/src/part3/simple_net.pt2
Binary file not shown.
Loading

0 comments on commit f8d6376

Please sign in to comment.