"mmdet3d/ops/vscode:/vscode.git/clone" did not exist on "8d4bef2872a42b746b959e7dfbab334f5993d287"
Unverified Commit 9c5253f1 authored by Toby Boyd's avatar Toby Boyd Committed by GitHub
Browse files

r/tf.random_uniform/tf.random.uniform (#6735)

parent 58856e2b
......@@ -643,6 +643,7 @@ class BaseDataConstructor(threading.Thread):
class DummyConstructor(threading.Thread):
"""Class for running with synthetic data."""
def run(self):
pass
......@@ -666,15 +667,15 @@ class DummyConstructor(threading.Thread):
num_users = params["num_users"]
num_items = params["num_items"]
users = tf.random_uniform([batch_size], dtype=tf.int32, minval=0,
users = tf.random.uniform([batch_size], dtype=tf.int32, minval=0,
maxval=num_users)
items = tf.random_uniform([batch_size], dtype=tf.int32, minval=0,
items = tf.random.uniform([batch_size], dtype=tf.int32, minval=0,
maxval=num_items)
if is_training:
valid_point_mask = tf.cast(tf.random_uniform(
valid_point_mask = tf.cast(tf.random.uniform(
[batch_size], dtype=tf.int32, minval=0, maxval=2), tf.bool)
labels = tf.cast(tf.random_uniform(
labels = tf.cast(tf.random.uniform(
[batch_size], dtype=tf.int32, minval=0, maxval=2), tf.bool)
data = {
movielens.USER_COLUMN: users,
......@@ -682,7 +683,7 @@ class DummyConstructor(threading.Thread):
rconst.VALID_POINT_MASK: valid_point_mask,
}, labels
else:
dupe_mask = tf.cast(tf.random_uniform([batch_size], dtype=tf.int32,
dupe_mask = tf.cast(tf.random.uniform([batch_size], dtype=tf.int32,
minval=0, maxval=2), tf.bool)
data = {
movielens.USER_COLUMN: users,
......
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