27187bfff545ef066da5627d7dff8a6caad19e9e,tensorflow_transform/impl_helper_test.py,ImplHelperTest,testImportAndExportSparse,#ImplHelperTest#,206

Before Change



  def testImportAndExportSparse(self):
    // Export the function "z = x + y"
    g = tf.Graph()
    with g.as_default():
      x = tf.sparse_placeholder(tf.float32)
      y = tf.sparse_placeholder(tf.float32)
      z = tf.sparse_add(x, y)
    transform_fn_def = impl_helper.make_transform_fn_def(
        g, {"x": x, "y": y}, {"z": z})

    // Import the function, applying it to constants for x and y.

After Change


      return {
          "z": api.map(tf.sparse_add, inputs["x"], inputs["y"])
      }
    input_schema = self.toSchema({
        "x": tf.VarLenFeature(tf.float32),
        "y": tf.VarLenFeature(tf.float32)
    })

    inputs, outputs = impl_helper.run_preprocessing_fn(
        preprocessing_fn, input_schema)
    saved_model_dir = os.path.join(self.get_temp_dir(), "sparse")
    _ = impl_helper.make_transform_fn_def(
        input_schema, inputs, outputs, saved_model_dir)

    // Import the function, applying it to constants for x and y.
    g = tf.Graph()
    with g.as_default():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: tensorflow/transform
Commit Name: 27187bfff545ef066da5627d7dff8a6caad19e9e
Time: 2017-02-16
Author: no-reply@google.com
File Name: tensorflow_transform/impl_helper_test.py
Class Name: ImplHelperTest
Method Name: testImportAndExportSparse


Project Name: tensorflow/transform
Commit Name: 27187bfff545ef066da5627d7dff8a6caad19e9e
Time: 2017-02-16
Author: no-reply@google.com
File Name: tensorflow_transform/impl_helper_test.py
Class Name: ImplHelperTest
Method Name: testImportAndExportDense


Project Name: RasaHQ/rasa
Commit Name: 4834536f529414c39f9d33b76f2197ef01dd939a
Time: 2018-08-08
Author: mr.voov@gmail.com
File Name: rasa_core/policies/keras_policy.py
Class Name: KerasPolicy
Method Name: load