def setUp(self) -> None: self._tf_reader = graphdef.Reader(fold_constants=True) self._tf_writer = graphdef.Writer() self._tf_optimizer = tf_opt.Optimizer() self._nnef_optimizer = nnef_opt.Optimizer() self._tf_to_nnef_converter = tf_to_nnef.Converter(io_transpose=self._io_transpose) self._nnef_to_tf_converter = nnef_to_tf.Converter(io_transpose=self._io_transpose) self._nnef_reader = nnef_io.Reader(custom_shapes=self._nnef_to_tf_converter.defined_shapes(), decomposed=self._nnef_to_tf_converter.decomposed_operations()) self._nnef_writer = nnef_io.Writer(fragments=self._tf_to_nnef_converter.defined_operations())
def setUp(self) -> None: self._onnx_reader = onnx_io.Reader(simplify=True) self._onnx_writer = onnx_io.Writer() self._onnx_to_nnef_converter = onnx_to_nnef.Converter() self._nnef_to_onnx_converter = nnef_to_onnx.Converter() self._nnef_reader = nnef_io.Reader( custom_shapes=self._nnef_to_onnx_converter.custom_shapes(), decomposed=self._nnef_to_onnx_converter.decomposed_operations()) self._nnef_writer = nnef_io.Writer( fragments=self._onnx_to_nnef_converter.defined_operations()) self._nnef_optimizer = nnef_opt.Optimizer() self._onnx_optimizer = onnx_opt.Optimizer()
def setUp(self) -> None: self._tflite_reader = lite_io.Reader() self._tflite_writer = lite_io.Writer() self._tflite_to_nnef_converter = tflite_to_nnef.Converter( io_transpose=self._io_transpose, mirror_unsupported=self._mirror_unsupported) self._nnef_to_tflite_converter = nnef_to_tflite.Converter( io_transpose=self._io_transpose, mirror_unsupported=self._mirror_unsupported) self._nnef_reader = nnef_io.Reader( custom_shapes=self._nnef_to_tflite_converter.custom_shapes(), decomposed=self._nnef_to_tflite_converter.decomposed_operations()) self._nnef_writer = nnef_io.Writer( fragments=self._tflite_to_nnef_converter.defined_operations()) self._nnef_optimizer = nnef_opt.Optimizer() self._tflite_optimizer = tflite_opt.Optimizer()