mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-24 12:09:22 +01:00
[to #42322933] fix cpu inference
修复cpu推理
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10468823
This commit is contained in:
@@ -56,9 +56,6 @@ class OneStageDetector(nn.Module):
|
||||
|
||||
def inference(self, meta):
|
||||
with torch.no_grad():
|
||||
torch.cuda.synchronize()
|
||||
preds = self(meta['img'])
|
||||
torch.cuda.synchronize()
|
||||
results = self.head.post_process(preds, meta)
|
||||
torch.cuda.synchronize()
|
||||
return results
|
||||
|
||||
Reference in New Issue
Block a user