Skip to content

Commit

Permalink
Revise danet.py (#1507)
Browse files Browse the repository at this point in the history
The dropout layer should be placed before the classification layer.
  • Loading branch information
BebDong authored Nov 11, 2020
1 parent 0863296 commit 9f6578e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gluoncv/model_zoo/danet.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ def __init__(self, in_channels, out_channels, norm_layer=nn.BatchNorm, norm_kwar
self.conv52.add(nn.Activation('relu'))

self.conv6 = nn.HybridSequential()
self.conv6.add(nn.Conv2D(in_channels=512, channels=out_channels, kernel_size=1))
self.conv6.add(nn.Dropout(0.1))
self.conv6.add(nn.Conv2D(in_channels=512, channels=out_channels, kernel_size=1))

self.conv7 = nn.HybridSequential()
self.conv7.add(nn.Conv2D(in_channels=512, channels=out_channels, kernel_size=1))
self.conv7.add(nn.Dropout(0.1))
self.conv7.add(nn.Conv2D(in_channels=512, channels=out_channels, kernel_size=1))

self.conv8 = nn.HybridSequential()
self.conv8.add(nn.Conv2D(in_channels=512, channels=out_channels, kernel_size=1))
self.conv8.add(nn.Dropout(0.1))
self.conv8.add(nn.Conv2D(in_channels=512, channels=out_channels, kernel_size=1))

def hybrid_forward(self, F, x):
feat1 = self.conv5a(x)
Expand Down Expand Up @@ -191,4 +191,4 @@ def get_danet_resnet101_citys(**kwargs):
>>> model = get_danet_resnet101_citys(pretrained=True)
>>> print(model)
"""
return get_danet('citys', 'resnet101', **kwargs)
return get_danet('citys', 'resnet101', **kwargs)

0 comments on commit 9f6578e

Please sign in to comment.