MCPcopy
hub / github.com/JaidedAI/EasyOCR / to_numpy

Function to_numpy

easyocr/export.py:66–69  ·  view source on GitHub ↗
(tensor)

Source from the content-addressed store, hash-verified

64 ort_session = onnxruntime.InferenceSession(detector_onnx_save_path)
65
66 def to_numpy(tensor):
67 if tensor.requires_grad:
68 return tensor.detach().cpu().numpy()
69 return tensor.cpu().numpy()
70
71 # compute ONNX Runtime output prediction
72 ort_inputs = {ort_session.get_inputs()[0].name: to_numpy(dummy_input)}

Callers 1

export_detectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…