Example #1
0
 def __init__(self):
     super().__init__()
     self.num_classes = num_classes
     self.feature_model = resnet_model('resnet50', 'layer4').cuda()
     self.pose_models = nn.ModuleList([
         model_3layer(N0, N1, N2, ndim) for i in range(self.num_classes)
     ]).cuda()
Example #2
0
	def __init__(self):
		super().__init__()
		self.num_classes = num_classes
		if args.feature_network == 'resnet':
			self.feature_model = resnet_model('resnet50', 'layer4').cuda()
		elif args.feature_network == 'vgg':
			self.feature_model = vgg_model('vgg13', 'fc6').cuda()
		self.pose_models = nn.ModuleList([model_3layer(args.N0, args.N1, args.N2, ndim) for i in range(self.num_classes)]).cuda()
Example #3
0
 def __init__(self):
     super().__init__()
     self.num_classes = num_classes
     if args.feature_network == 'resnet':
         self.feature_model = resnet_model('resnet50', 'layer4').cuda()
     elif args.feature_network == 'vgg':
         self.feature_model = vgg_model('vgg13', 'fc6').cuda()
     self.pose_model = model_3layer(args.N0, args.N1, args.N2, ndim).cuda()
     self.category_model = nn.Linear(args.N0, num_classes).cuda()
	def __init__(self, dict_size):
		super().__init__()
		self.num_classes = num_classes
		self.feature_model = resnet_model('resnet50', 'layer4').cuda()
		self.pose_models = nn.ModuleList([model_3layer(args.N0, args.N1, args.N2, dict_size) for i in range(self.num_classes)]).cuda()
Example #5
0
 def __init__(self):
     super().__init__()
     self.num_classes = num_classes
     self.feature_model = resnet_model('resnet50', 'layer4').cuda()
     self.pose_model = model_3layer(args.N0, args.N1, args.N2, ndim).cuda()