CoactSeg / data /code /networks /net_factory.py
introvoyz041's picture
Migrated from GitHub
d431026 verified
Raw
History Blame Contribute Delete
441 Bytes
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