| from networks.VNet import VNet | |
| def net_factory(net_type="vnet", in_chns=3, class_num=2, mode = "train"): | |
| if net_type == "vnet" and mode == "train": | |
| net = VNet(n_channels=in_chns, n_classes=class_num, normalization='batchnorm', has_dropout=True).cuda() | |
| elif net_type == "vnet" and mode == "test": | |
| net = VNet(n_channels=in_chns, n_classes=class_num, normalization='batchnorm', has_dropout=False).cuda() | |
| return net | |