Skip to content

Commit

Permalink
line 40: Explicitly cast to int
Browse files Browse the repository at this point in the history
  • Loading branch information
wctu authored Apr 4, 2019
1 parent 12f0a52 commit 17584dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def forward(self, x):
class PixelAffinityNet(nn.Module):
def __init__(self, nr_channel, conv1_size, use_canny=True):
super(PixelAffinityNet, self).__init__()
pad_size = (conv1_size - 1) / 2
pad_size = int((conv1_size - 1) / 2)
self.pad1 = nn.ReplicationPad2d((pad_size, pad_size, 0, 0)) # left, right, top, bottom
self.conv1 = nn.Conv2d(3, nr_channel, kernel_size=(1, conv1_size), stride=1, padding=0, bias=True)
self.in1 = nn.InstanceNorm2d(nr_channel, affine=False, track_running_stats=True)
Expand Down

0 comments on commit 17584dc

Please sign in to comment.