def data_input(input):
x = input[0]
y = input[1]
z = input[2]
random_int = tf.random_uniform([1])
condition1 = random_int[0] > tf.constant(rand_threshold[1])
condition0 = random_int[0] > tf.constant(rand_threshold[0])
val = tf.case({condition1: lambda: x,
condition0: lambda: y
},
default=lambda: z)
val.set_shape(z.shape)
return [val,random_int]# tuple (output,random_int ) is NOT allowed
评论列表
文章目录