Browse Source

refactor: remove commented-out device assignment in predict_formula.py

myhloli 4 weeks ago
parent
commit
f57a6d8d9e
1 changed files with 0 additions and 1 deletions
  1. 0 1
      mineru/model/mfr/pp_formulanet_plus_m/predict_formula.py

+ 0 - 1
mineru/model/mfr/pp_formulanet_plus_m/predict_formula.py

@@ -45,7 +45,6 @@ class FormulaRecognizer(BaseOCRV20):
         super(FormulaRecognizer, self).__init__(network_config)
         super(FormulaRecognizer, self).__init__(network_config)
 
 
         self.load_state_dict(weights)
         self.load_state_dict(weights)
-        # device = "cpu"
         self.device = torch.device(device) if isinstance(device, str) else device
         self.device = torch.device(device) if isinstance(device, str) else device
         self.net.to(self.device)
         self.net.to(self.device)
         self.net.eval()
         self.net.eval()