afe.load.importers.caffe2 ========================= .. py:module:: afe.load.importers.caffe2 Functions --------- .. autoapisummary:: afe.load.importers.caffe2.get_caffe2_predictor afe.load.importers.caffe2.validate_input_parameters afe.load.importers.caffe2.import_caffe2_to_tvm Module Contents --------------- .. py:function:: get_caffe2_predictor(init_net_file_path: str, predict_net_file_path: str) Returns a predictor object we can use to execute the caffe2 model :param init_net_file_path: filepath to the caffe2 .pb init_net file :param predict_net_file_path: filepath to the caffe2 .pb predict_net file .. py:function:: validate_input_parameters(init_net_file_path: str, predict_net_file_path: str, shape_dict: Dict[str, Tuple[int, Ellipsis]], dtype_dict: Dict[str, afe.ir.tensor_type.ScalarType]) -> None Validates the user supplied input. :param init_net_file_path: filepath to the caffe2 .pb init_net file :param predict_net_file_path: filepath to the caffe2 .pb predict_net file :param shape_dict: dictionary of input names to input shapes (eg. (1,224,224,3)) :param dtype_dict: dictionary of input names to input types (eg. float32 or int64) .. py:function:: import_caffe2_to_tvm(init_net_file_path: str, predict_net_file_path: str, shape_dict: Dict[str, Tuple[int, Ellipsis]], dtype_dict: Dict[str, afe.ir.tensor_type.ScalarType]) -> afe._tvm._defines.TVMIRModule Use TVM frontend to import a caffe2 pb model into TVM Relay IR :param init_net_file_path: filepath to the caffe2 .pb init_net file :param predict_net_file_path: filepath to the caffe2 .pb predict_net file :param shape_dict: dictionary of input names to input shapes (eg. (1,224,224,3)) :param dtype_dict: dictionary of input names to input types (eg. float32 or int64) :return: Imported TVM IR module.