Unverified Commit 1b089751 authored by Hongjun Choi's avatar Hongjun Choi Committed by GitHub
Browse files

Merged commit includes the following changes: (#7346)

* Merged commit includes the following changes:
260800447  by A. Unique TensorFlower<gardener@tensorflow.org>:

    Fix tf function signature errors for NCF model.

--
260767064  by psv<psv@google.com>:

    Renames the `run_distributed` flag to `experimental_run_tf_function` and modifies the tests generated by the keras_all_modes decorator to better reflect that.

--

PiperOrigin-RevId: 260800447

* Update ncf_keras_benchmark.py

* Update ncf_keras_benchmark.py

* Update ncf_keras_benchmark.py

* Update ncf_keras_benchmark.py
parent a552e76a
...@@ -161,7 +161,7 @@ class DatasetManager(object): ...@@ -161,7 +161,7 @@ class DatasetManager(object):
tf.io.FixedLenFeature([batch_size], dtype=tf.int64) tf.io.FixedLenFeature([batch_size], dtype=tf.int64)
} }
features = tf.parse_single_example( features = tf.io.parse_single_example(
serialized_data, _get_feature_map(batch_size, is_training=is_training)) serialized_data, _get_feature_map(batch_size, is_training=is_training))
users = tf.reshape( users = tf.reshape(
tf.cast(features[movielens.USER_COLUMN], rconst.USER_DTYPE), tf.cast(features[movielens.USER_COLUMN], rconst.USER_DTYPE),
......
...@@ -255,7 +255,7 @@ def run_ncf(_): ...@@ -255,7 +255,7 @@ def run_ncf(_):
callbacks.append(per_epoch_callback) callbacks.append(per_epoch_callback)
else: else:
assert params["eval_dataset_path"] and params["input_meta_data_path"] assert params["eval_dataset_path"] and params["input_meta_data_path"]
with tf.gfile.GFile(params["input_meta_data_path"], "rb") as reader: with tf.io.gfile.GFile(params["input_meta_data_path"], "rb") as reader:
input_meta_data = json.loads(reader.read().decode("utf-8")) input_meta_data = json.loads(reader.read().decode("utf-8"))
num_users = input_meta_data["num_users"] num_users = input_meta_data["num_users"]
num_items = input_meta_data["num_items"] num_items = input_meta_data["num_items"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment