Method
_direct_initialize_inputs
(cls, inputs, initialized, ws, device_option)
Source from the content-addressed store, hash-verified
| 632 | |
| 633 | @classmethod |
| 634 | def _direct_initialize_inputs(cls, inputs, initialized, ws, device_option): |
| 635 | for value_info in inputs: |
| 636 | if value_info.name in initialized: |
| 637 | continue |
| 638 | shape = list(d.dim_value for d in value_info.type.tensor_type.shape.dim) |
| 639 | ws.FeedBlob( |
| 640 | value_info.name, |
| 641 | np.ones(shape, dtype=onnx.mapping.TENSOR_TYPE_TO_NP_TYPE[value_info.type.tensor_type.elem_type]), |
| 642 | device_option) |
| 643 | |
| 644 | @staticmethod |
| 645 | def optimize_onnx(input, init=False, predict=False): |
Tested by
no test coverage detected