Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# -*- encoding: utf-8 -*- 

2""" 

3@file 

4@brief Shortcut to *ops_cpu*. 

5""" 

6from ._op import OpRunOnnxRuntime 

7 

8 

9def load_op(onnx_node, desc=None, options=None, variables=None, dtype=None): 

10 """ 

11 Gets the operator related to the *onnx* node. 

12 

13 @param onnx_node :epkg:`onnx` node 

14 @param desc internal representation 

15 @param options runtime options 

16 @param variables registered variables created by previous operators 

17 @param dtype float computation type 

18 @return runtime class 

19 """ 

20 if desc is None: 

21 raise ValueError( # pragma: no cover 

22 "desc should not be None.") 

23 return OpRunOnnxRuntime(onnx_node, desc, variables=variables, 

24 dtype=dtype, **options)