tensorflow variable

#coding=utf-8
import tensorflow as tf
import numpy as np

my_var = tf.Variable(3, name = "my_variable")
add = tf.add(5, my_var)
mul = tf.mul(8, my_var)

zeros = tf.zeros([2, 2])
ones = tf.ones([6])

uniform = tf.random_uniform([3, 3, 3], minval = 0, maxval = 10)
normal = tf.random_normal([3, 3, 3], mean = 0.0, stddev = 2.0)
trunc = tf.truncated_normal([2, 2], mean = 5.0, stddev = 1.0)
random_var = tf.Variable(tf.truncated_normal([2, 2]))

你可能感兴趣的:(tensorflow variable)