Open julien0220 opened 1 year ago
There are slight difference from mobile devices, but try this:
seed=2023
random.seed(seed)
numpy.random.seed(seed)
torch.manual_seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed) # all gpus
torch.backends.cudnn.benchmark = False
torch.backends.cudnn.deterministic = True
torch.use_deterministic_algorithms(True)
torch.set_default_tensor_type(torch.float32)
Can detect the correct class, but the probability is reduced
runing on pc, it gets 83%
running on android, it gets 55%