Skip to content

Commit

Permalink
Merge pull request #104 from mapbox/assert-resolution
Browse files Browse the repository at this point in the history
Assert image resolution has to be divisible by 32 for resnet
  • Loading branch information
bkowshik authored Aug 10, 2018
2 parents d33ae08 + d65190b commit 495edfb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions robosat/unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def forward(self, x):
Returns:
The networks output tensor.
"""
size = x.size()
assert size[-1] % 32 == 0 and size[-2] % 32 == 0, "image resolution has to be divisible by 32 for resnet"

enc0 = self.resnet.conv1(x)
enc0 = self.resnet.bn1(enc0)
Expand Down

0 comments on commit 495edfb

Please sign in to comment.