update testsingle.py.
This commit is contained in:
@ -36,7 +36,7 @@ model = None
|
||||
#model = VisionTransformer(config, args.img_size, zero_head=True, num_classes=num_classes, smoothing_value=args.smoothing_value)
|
||||
|
||||
if args.pretrained_model is not None:
|
||||
model = torch.load(args.pretrained_model) #自己预训练模型
|
||||
model = torch.load(args.pretrained_model,map_location=torch.device('cpu')) #自己预训练模型
|
||||
model.to(args.device)
|
||||
model.eval()
|
||||
|
||||
|
Reference in New Issue
Block a user