Skip to content
Discussion options

You must be logged in to vote

Our BasicUNet class uses maxpool so that is an option. For the general UNet class it's general experience that maxpooling isn't optimal versus using strided convolutions as we do. However if you wanted to change how the behaviour works you would have to override the UNet._get_down_layer method in a subclass of UNet which would call the inherited method with arguments passed except with strides set to 1, but return a nn.Sequential object containing the maxpool layer and the layer returned by the called inherited method. I think that will give you the behaviour you're expecting, my sketch of this is below which I haven't tested at all:

def _get_down_layer(self, in_channels: int, out_channels: 

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mikami520
Comment options

Answer selected by mikami520
Comment options

You must be logged in to vote
3 replies
@mikami520
Comment options

@ebrahimebrahim
Comment options

@mikami520
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #4353 on May 26, 2022 10:50.