Ejemplo n.º 1
0
def power_difference_op(input_x, input_y, input_pow):
    with tf.Session() as sess:
        x = tf.placeholder(tf.float32, name='x')
        y = tf.placeholder(tf.float32, name='y')
        pow_ = tf.placeholder(tf.float32, name='pow')
        z = tf.power_difference(x, y, pow_)
        return sess.run(z, feed_dict={x: input_x, y: input_y, pow_: input_pow})
Ejemplo n.º 2
0
def power_difference_op(input_x,input_y,input_pow):
    with tf.Session() as sess:
        # TODO:完成TensorFlow接口调用
        placeholder_x = tf.placeholder(tf.float32, shape=input_x.shape, name='placeholder_x')
        placeholder_y = tf.placeholder(tf.float32, shape=input_y.shape, name='placeholder_y')
        placeholder_z = tf.placeholder(tf.float32, name='placeholder_z')
        out = tf.power_difference(placeholder_x, placeholder_y, placeholder_z)
        return sess.run(out, feed_dict = {placeholder_x:input_x, placeholder_y:input_y, placeholder_z:input_pow})
def power_difference_op(input_x, input_y, input_pow):
    with tf.Session() as sess:
        x = tf.placeholder(tf.float32, shape=input_x.shape)
        y = tf.placeholder(tf.float32, shape=input_y.shape)
        pow = tf.placeholder(tf.int32)
        out = tf.power_difference(x, y, pow)
        return sess.run(out,
                        feed_dict={
                            x: input_x,
                            y: input_y,
                            pow: input_pow
                        })
Ejemplo n.º 4
0
def power_difference_op(input_x,input_y,input_pow):
    with tf.Session() as sess:
      # TODO:完成TensorFlow接口调用
      out = tf.power_difference()
      return sess.run(out, feed_dict = {...})