예제 #1
0
파일: u_model.py 프로젝트: WalkerGoXQ/ReLIC
    def __init__(self, pretrained_base_model=True):
        super(NIMA, self).__init__()
        base_model = mobile_net_v2(pretrained=pretrained_base_model)
        base_model = nn.Sequential(*list(base_model.children())[:-1])

        self.base_model = base_model

        self.head = nn.Sequential(nn.ReLU(inplace=True), nn.Dropout(p=0.75),
                                  nn.Linear(1280, 10), nn.Softmax(dim=1))
예제 #2
0
파일: u_model.py 프로젝트: WalkerGoXQ/ReLIC
    def __init__(self, pretrained_base_model=True):
        super(NIMA, self).__init__()
        base_model = mobile_net_v2(pretrained=pretrained_base_model)
        base_model = nn.Sequential(*list(base_model.children())[:-1])

        self.base_model = base_model

        self.head = nn.Sequential(nn.Linear(1280, 50), nn.ReLU(True),
                                  nn.Dropout(), nn.Linear(50, 1))
예제 #3
0
    def __init__(self, pretrained_base_model=True):
        super(NIMA, self).__init__()
        base_model = mobile_net_v2(pretrained=pretrained_base_model)
        base_model = nn.Sequential(*list(base_model.children())[:-2])

        self.base_model = base_model

        self.pool = nn.AvgPool2d(7)

        self.head = nn.Sequential(nn.ReLU(), nn.Dropout(p=0.75),
                                  nn.Linear(3681, 10), nn.Softmax(dim=1))