예제 #1
0
def main(unused_args):
  # Eager execution is enabled by default in TF 2.0, but generated example
  # tests are still using non-eager features (e.g. `tf.placeholder`).
  tf.compat.v1.disable_eager_execution()

  options = generate_examples_lib.Options()

  options.output_path = FLAGS.output_path
  options.zip_to_output = FLAGS.zip_to_output
  options.toco = FLAGS.toco
  options.known_bugs_are_errors = FLAGS.known_bugs_are_errors
  options.ignore_converter_errors = FLAGS.ignore_converter_errors
  options.save_graphdefs = FLAGS.save_graphdefs
  options.run_with_flex = FLAGS.run_with_flex
  options.make_edgetpu_tests = FLAGS.make_edgetpu_tests
  options.make_forward_compat_test = FLAGS.make_forward_compat_test
  options.tflite_convert_function = toco_convert.toco_convert
  options.no_tests_limit = FLAGS.no_tests_limit
  options.no_conversion_report = FLAGS.no_conversion_report

  if FLAGS.test_sets:
    test_sets = FLAGS.test_sets.split(",")
    generate_examples_lib.generate_multi_set_examples(options, test_sets)
  else:
    generate_examples_lib.generate_examples(options)
예제 #2
0
def main(unused_args):
    options = generate_examples_lib.Options()

    options.output_path = FLAGS.output_path
    options.zip_to_output = FLAGS.zip_to_output
    options.toco = FLAGS.toco
    options.known_bugs_are_errors = FLAGS.known_bugs_are_errors
    options.ignore_converter_errors = FLAGS.ignore_converter_errors
    options.save_graphdefs = FLAGS.save_graphdefs
    options.run_with_flex = FLAGS.run_with_flex

    generate_examples_lib.generate_examples(options)
예제 #3
0
def main(unused_args):
  options = generate_examples_lib.Options()

  options.output_path = FLAGS.output_path
  options.zip_to_output = FLAGS.zip_to_output
  options.toco = FLAGS.toco
  options.known_bugs_are_errors = FLAGS.known_bugs_are_errors
  options.ignore_converter_errors = FLAGS.ignore_converter_errors
  options.save_graphdefs = FLAGS.save_graphdefs
  options.run_with_flex = FLAGS.run_with_flex

  generate_examples_lib.generate_examples(options)
예제 #4
0
def main(unused_args):
  from tensorflow.lite.testing import generate_examples_lib
  params = generate_examples_lib.Params()

  params.output_path = FLAGS.output_path
  params.zip_to_output = FLAGS.zip_to_output
  params.toco = FLAGS.toco
  params.known_bugs_are_errors = FLAGS.known_bugs_are_errors
  params.ignore_toco_errors = FLAGS.ignore_toco_errors
  params.save_graphdefs = FLAGS.save_graphdefs
  params.run_with_flex = FLAGS.run_with_flex

  generate_examples_lib.generate_examples(params)
예제 #5
0
def main(unused_args):
    options = generate_examples_lib.Options()

    options.output_path = FLAGS.output_path
    options.zip_to_output = FLAGS.zip_to_output
    options.toco = FLAGS.toco
    options.known_bugs_are_errors = FLAGS.known_bugs_are_errors
    options.ignore_converter_errors = FLAGS.ignore_converter_errors
    options.save_graphdefs = FLAGS.save_graphdefs
    options.run_with_flex = FLAGS.run_with_flex
    options.make_edgetpu_tests = FLAGS.make_edgetpu_tests
    options.make_forward_compat_test = FLAGS.make_forward_compat_test
    options.tflite_convert_function = toco_convert.toco_convert

    generate_examples_lib.generate_examples(options)
예제 #6
0
def main(unused_args):
    options = generate_examples_lib.Options()

    options.output_path = FLAGS.output_path
    options.zip_to_output = FLAGS.zip_to_output
    options.known_bugs_are_errors = FLAGS.known_bugs_are_errors
    options.ignore_converter_errors = FLAGS.ignore_converter_errors
    options.save_graphdefs = FLAGS.save_graphdefs
    options.run_with_flex = FLAGS.run_with_flex
    options.make_edgetpu_tests = FLAGS.make_edgetpu_tests
    options.tflite_convert_function = mlir_convert.mlir_convert
    options.known_bugs = MLIR_CONVERTER_KNOWN_BUGS
    options.make_forward_compat_test = FLAGS.make_forward_compat_test
    options.use_experimental_converter = True
    options.mlir_quantizer = FLAGS.mlir_quantizer

    if FLAGS.test_sets:
        test_sets = FLAGS.test_sets.split(",")
        generate_examples_lib.generate_multi_set_examples(options, test_sets)
    else:
        generate_examples_lib.generate_examples(options)
def main(unused_args):
    options = generate_examples_lib.Options()

    options.output_path = FLAGS.output_path
    options.zip_to_output = FLAGS.zip_to_output
    options.toco = FLAGS.toco
    options.known_bugs_are_errors = FLAGS.known_bugs_are_errors
    options.ignore_converter_errors = FLAGS.ignore_converter_errors
    options.save_graphdefs = FLAGS.save_graphdefs
    options.run_with_flex = FLAGS.run_with_flex
    options.make_edgetpu_tests = FLAGS.make_edgetpu_tests
    options.make_forward_compat_test = FLAGS.make_forward_compat_test
    options.tflite_convert_function = toco_convert.toco_convert
    options.no_tests_limit = FLAGS.no_tests_limit
    options.no_conversion_report = FLAGS.no_conversion_report

    if FLAGS.test_sets:
        test_sets = FLAGS.test_sets.split(",")
        generate_examples_lib.generate_multi_set_examples(options, test_sets)
    else:
        generate_examples_lib.generate_examples(options)