Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple op test for if. Also includes a nifty little helper function that would reduce error & duplication by avoiding re-specifying dtypes and shapes ```python inputs = session.get_inputs() # gets Z in outputs[0] outputs = session.get_outputs() def generate_input_from_node(node: onnxruntime.capi.onnxruntime_pybind11_state.NodeArg): if node.type == "tensor(float)": return numpy.random.randn(*node.shape).astype(numpy.float32) if node.type == "tensor(int)": return numpy.random.randint(0, 10000, size=node.shape).astype(numpy.int32) if node.type == "tensor(bool)": return numpy.random.randint(0, 2, size=node.shape).astype(bool) input_dict = { node.name: generate_input_from_node(node) for node in inputs } output_list = [ node.name for node in outputs ] ```
- Loading branch information