Skip to content

A Dropout rate of 50% is systematically applied in the V-Net even when dropout_prob is set to 0 #6116

Closed

Description

@BLmbert

First of all thanks for this great repo !

I noticed that the segmentation performance of the V-Net was a step below other architectures (DynUNet, BasicUnetPlusPlus ...). By looking at the implementation, I noticed that a dropout rate of 50% is systematically applied (hard-coded) in the UpTransition layers of the V-Net, even the user sets dropout_prob to 0.

In monai.networks.nets.vnet :
self.dropout = dropout_type(dropout_prob) if dropout_prob is not None else None (l147)
--> self.dropout2 = dropout_type(0.5) (l148)

Expected behavior
It is expected that dropout is set to 0 when dropout_prob is set to 0 in the VNet class.

https://github.com/Project-MONAI/MONAI/blob/dev/monai/networks/nets/vnet.py

Activity

  1. Nic-Ma commented on Mar 8, 2023

    @Nic-Ma
    Contributor

    Hi @wyli ,

    I think the original author of VNet already left our team, could you please help confirm this question?

    Thanks in advance.

  2. KumoLiu commented on Mar 9, 2023

    @KumoLiu
    Contributor

    Hi @BLmbert, I just take a look at the original implementation. There are indeed two dropout rate in the net. The second dropout is hardcoded to 0.5 in the original implementation. Of course, we could also make the second dropout ratio more flexible as well. The dropout_prob the user set is used in Line 155
    https://github.com/mattmacy/vnet.pytorch/blob/a00c8ea16bcaea2bddf73b2bf506796f70077687/vnet.py#L93-L94

    Thanks!
    cc @wyli @Nic-Ma

  3. added a commit that references this issue on Jul 27, 2023
    87d0ede
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions