assignment5 - Jupyter Notebook

PHOTO EMBED

Wed Mar 06 2024 21:04:26 GMT+0000 (Coordinated Universal Time)

Saved by @joshwithaj #undefined

########################################################################
# TODO: "Implement the forward function for the Resnet specified"        #
# above. HINT: You might need to create a helper class to              # 
# define a Resnet block and then use that block here to create         #
# the resnet layers i.e. conv2_x, conv3_x, conv4_x and conv5_x         #
########################################################################
# *****START OF YOUR CODE (DO NOT DELETE/MODIFY THIS LINE)*****
class ResNet(nn.Module):
    def __init__(self):
        super(ResNet, self).__init__()
        in_channels = 64
        out_channels = 64
        stride = 1
        self.conv1 = nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3, bias=False)
        self.bn1 = nn.BatchNorm2d(64)
        nn.ReLU()
        self.maxpool = nn.MaxPool2d(kernel_size = 3, stride = 2, padding = 1)
        
​
        
        pass
    def forward(self):
        pass
    
    
########################################################################
#                             END OF YOUR CODE                         #
########################################################################
content_copyCOPY

https://datahub.ucsd.edu/user/j6villanueva/notebooks/private/assignment5/assignment5.ipynb