Created
September 21, 2020 17:20
-
-
Save lucabergamini/c45d60be506ce948587350ad99b99735 to your computer and use it in GitHub Desktop.
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
model = resnet50(pretrained=True) | |
# change input channels number to match the rasterizer's output | |
model.conv1 = nn.Conv2d( | |
num_in_channels, | |
model.conv1.out_channels, | |
kernel_size=model.conv1.kernel_size, | |
stride=model.conv1.stride, | |
padding=model.conv1.padding, | |
bias=False, | |
) | |
# change output size to (X, Y) * number of future states | |
model.fc = nn.Linear(in_features=2048, out_features=num_targets) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment