in src/exporters/coreml/config.py [0:0]
def _convert_dummy_inputs_to_framework(self, dummy_inputs, framework):
if framework == TensorType.PYTORCH and is_torch_available():
import torch
for key, (ref_value, coreml_value) in dummy_inputs.items():
if isinstance(ref_value, np.ndarray):
dummy_inputs[key] = (torch.tensor(ref_value), coreml_value)
return dummy_inputs