14b7ac5210cf4d4e4cdffcc7739cc0c9817c6a00,official/vision/beta/serving/semantic_segmentation_test.py,SemanticSegmentationExportTest,_export_from_module,#SemanticSegmentationExportTest#Any#Any#Any#,40

Before Change


    return segmentation_module

  def _export_from_module(self, module, input_type, save_directory):
    if input_type == "image_tensor":
      input_signature = tf.TensorSpec(shape=[None, 112, 112, 3], dtype=tf.uint8)
      signatures = {
          "serving_default":
              module.inference_from_image_tensors.get_concrete_function(
                  input_signature)
      }
    elif input_type == "image_bytes":
      input_signature = tf.TensorSpec(shape=[None], dtype=tf.string)
      signatures = {
          "serving_default":
              module.inference_from_image_bytes.get_concrete_function(
                  input_signature)
      }
    elif input_type == "tf_example":
      input_signature = tf.TensorSpec(shape=[None], dtype=tf.string)
      signatures = {
          "serving_default":
              module.inference_from_tf_example.get_concrete_function(
                  input_signature)
      }
    else:
      raise ValueError("Unrecognized `input_type`")

    tf.saved_model.save(module,
                        save_directory,
                        signatures=signatures)

After Change


    return segmentation_module

  def _export_from_module(self, module, input_type, save_directory):
    signatures = module.get_inference_signatures(
        {input_type: "serving_default"})
    tf.saved_model.save(module, save_directory, signatures=signatures)

  def _get_dummy_input(self, input_type):
    Get dummy input for the given input type.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 10

Instances


Project Name: tensorflow/models
Commit Name: 14b7ac5210cf4d4e4cdffcc7739cc0c9817c6a00
Time: 2021-03-02
Author: hongkuny@google.com
File Name: official/vision/beta/serving/semantic_segmentation_test.py
Class Name: SemanticSegmentationExportTest
Method Name: _export_from_module


Project Name: tensorflow/models
Commit Name: 14b7ac5210cf4d4e4cdffcc7739cc0c9817c6a00
Time: 2021-03-02
Author: hongkuny@google.com
File Name: official/vision/beta/serving/image_classification_test.py
Class Name: ImageClassificationExportTest
Method Name: _export_from_module


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: a02b5c28b1ebe56bf5513d16aa6ef59d08ee28a5
Time: 2019-03-12
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/attacks/iterative_method.py
Class Name: BasicIterativeMethod
Method Name: __init__


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 13d1b4f446b91453d2d2993e25a1b652cfda45c1
Time: 2019-06-11
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/projected_gradient_descent.py
Class Name: ProjectedGradientDescent
Method Name: __init__